In short, planetary defense is MUCH more effective than resistance, in terms of invasion defense (resistance however helps against culture flipping as well).
Check out the WIKI for some good info on invasion mechanics:
http://galciv3.gamepedia.com/Ground_invasions
Currently, there is a bug with invasions results - if you win on offense, you lose none of your marines, just defender casualties. But in general, you do want as many troops as you can spare for overkill, as you will lose fewer (once they fix the bug).
No, its not possible to move the capital. Its just part of the randomness of planets you come across. The more buildings you build, the location of the capital becomes less important. Thats because you get far more benefit from hub buildings (power plants, research cloisters, banks, manf/research/econ capitals, etc) that you do from the capital building. Hence the capital location is more important on lower class worlds which dont have good long term terraforming potential.