The first two expansions have been planned/playtested and The Brink of War was not originally planned.
Per Tom Lehman
RFTG base game was developed and tested (alone) for about 15 months; then I did TGS and tested it for about a year; then I did RvI and tested it (with the base game and TGS) for about two years prior to RFTG's publication.
There was some tweaking of the base game and each expansion based on the combined game, as well as revisiting each one individually during the last year before publication. During this period, we did test whether the base game and just RvI was viable, without TGS. It works ok; though the lack of TGS's start worlds, Imperium Lords, Terraforming Guild, and Improved Logistics definitely affects play -- not being able to alter the tempo of the game makes the Produce/Consume strategies a lot stronger than when playing with the base game and both expansions.