This is a very annoying bug, and I have done a lot of playing around with it.
The number of tiles that disappear in an invasion are equal to the number of tiles they upgraded due to terraforming tech, although not necessarily the terraformed tiles. It doesn't make a difference what invasion tactic you use or your terraforming tech level, and it doesn't make a difference what alignment you use. If you spy before you culture flip, you will see that this even happens when you take a planet through culture flipping.
The only planets that are not effected by this are Minor Race planets - they aren't special, but the minor races don't research terraforming tech, so they have always terraformed 0 tiles.
You can get a planet to drop to quality 0 easily now if you use mass drivers, because the effect of mass drivers adds onto the PQ disappear tiles bug, in one case for me knocking out 12 planetary improvements.
This bug can knock out the original colony square as well - took over a PQ 2 that had a few soil enhancements on it, and the initial colony went poof. Pretty much made the planet useless except for the fact it could hold 6b population. (left it with 0/0/0 being produced)
Starting planets for each race are less effected, because you are probably only going to lose one or two tiles on an invasion (it all depends on your OPPONENTS level of terraforming tech) - but to recreate the bug to dramatic effect, gift all of the terraforming techs to your enemies and then start conquering/culture flipping worlds.
The game is still playable with this bug - you just have to realize that most worlds are now "garbage worlds" when you go to invade them. Build up a core set of worlds made up of the planets you colonize, minor race home worlds, and major race homeworlds. Everything else might as well be blow away, the game will rob you of your victory anyway. And if you trash a world it won't help the AI if it retakes it.
Also, sometimes the tiles disappear and the effect remains. I took over a fully upgraded pq4 (Mars, in this case) - which had no asteroids being diverted to it. After my attack, the planet only showed a starport, tech capital and original colony left. However, the planet was producing over 300 industrial units! (The planet had formerly been full of industrial sectors and a manufacturing capital)
Trade goods destroyed in this way cannot be traded, but their effects show up in your stats/graphs tab in the civilization manager.
I think they are aware of the bug, and I hope they are fixing it.