no, the base doesn't build itself, and no, you don't build the starbase "out of thin air." all bases require a constructor to build them, and it takes 2 tiers of researh to get the constructor for vasari, 3 for the others.
i think you are overreacting a little bit to the insult of having a starbase built on one of your back planets. i'm not saying it can't benefit your enemy to do this to you, but think about it. in many instances, it doesn't do you any real harm unless you allow it to. for instance, ask yourself this question: do you even need to take out that newly-built starbase on your planet? or if you do, do you need to take it out RIGHT NOW vs. waiting for a while to do it? have you ever thought of using a little asymettrical warfare?
think about it. what real harm does having an enemy starbase sitting at your homeworld do in most cases? it destabilizes the phase jump lanes, which means your ships jumping from that planet will take some damage and have their antimatter removed. so... just build a frig factory on another planet. how does that sound? route all ships that you can't afford to take damage or lose antimatter around that planet entirely. let the starbase just sit there, taking up resources. i have won many games against both human and AI by COMPLETELY IGNORING all of their starbases. i pissed one guy off by taking all of his planets while being careful to never touch all his pretty starbases. i just left them all sitting there. he was pissed. he kept saying "you should have to destroy the starbase before you can take my planet!"
the vasari sb can be a little more annoying beause it can move around the grav well taking out all your structures. so what to do? Scuttle all your structures in that grav well, and rebuild them on other worlds. let the pretty vasary sb sit in your grav well with nothing to do. it's not like it can bomb your planet or anything.
the best use of this tactic is the enemy using the starbase at your planet as a beachhead for his invading fleet. even in that situation, you aren't doomed by any means, but this reply is already long enough.
and yes, you should be able to build an SB anywhere. think about it. those neutral mining areas... wouldn't it be nice to occupy such places with starbases?