Currently, Resistance is used to defend against non physical attacks like information/propaganda. Only 'Defense' which scales with population is used to defend. The basic defense building which i think gives +20% to planetary defense would NOT survive against a transport with a 20% soldiering.
Unless things have changed since I last looked, this is wrong.
The way I understand planetary invasions to work is that the attacker comes in with I invaders. I * (1 - [planetary defense] + [invasion tactic modifier to planetary defense]) survive the landing process and face [planet quality] fights against [planetary population]*([resistance] - [invasion tactic modifier to resistance])/[planet quality] troops.
The target planet is a class-10 world with 20 population, a resistance of 50%, and a planetary defense score of 20%. I decide that I'm going to invade this world using Conventional Invasion (no modifiers to resistance or planetary defense) and a single transport loaded with 2.5 troops. Because I used an invasion tactic which does not modify planetary defense, I lose 0.5 troops (20% of 2.5) immediately. The surviving 2 troops all land in a single tile, where they're faced with 20 (total population) * 0.5 (resistance) / 10 (planet class) = 0.5 troops, who they presumably crush with few losses. After the invaders take that tile, all of the surviving invading troops move onto another tile, where they face another 0.5 defenders. This process continues until the invading force takes all 10 tiles or runs out of troops. Obviously, this greatly favors the invader.
That also isn't the only imbalance in the invasion mechanics; looking at the XML, it seems as though the kill:loss ratio is set to favor invading forces.