None of those late game improvements really give much bang for the buck, though. For one thing, they come very late in the game, when you can just finish one of the winning conditions instead. They also only boost the base yield, so if you have a size 20 city working entirely riverside trading posts (to pick a ridiculous example) the stock exchange is still only worth 20 gold/turn. if you want to rush buy that stock exchange, it will take about 40 turns for it to show a profit, and by then the game is over.
public schools and research labs are a joke. Their combined cost is 950 hammers, to get just 2 scientist slots. For 950 hammers you could build at least 5 settlers and 5 libraries, to get 10 new scientist slots. Then once those cities have grown to size 3 or 4 they'll easily outmatch the regular beakers you gain from the % gain.
Well, communism comes fairly late in the game too, a bit later than factories and that's not taking into account that you have to actually expand like a madman after you acquire communism, which takes tons more turns as well.
The gold buildings are a matter of math, taking into account big ben and the commerce SPs which you'll most likely have. Not always worth rushing, since you're trading immediate coin for coin over time.
The sciences buildings are definitely no joke. The accumulation of large pop + extra scientist specialists + extra beakers from trading posts and specialists (due to rationalism) adds up a ton considering you've probably spammed TPs, and all the beaker bonuses get multiplied through all the %boosts.
Using the exaggerated example of 20 TPs, that's 20 beakers just due to rationalism. Library gets +1 beaker for every 2 dudes, so you'll need to build your 5 settlers, build 5 cities and get them to 8 pop to equal the megacity's TPs. 5 libraries = 10 specialists = 30 beakers, but megacity with rationalism + research lab gets: 20 beakers (from TP) + 5 (from specialist in lab) + 75 (100% boost of everything in the city) = 100... hope I did that right. That's due to
rationalism and research lab alone.
Nevermind the university and public school and the extra beakers they pile up on top of everything. Each scientist is worth 15 beakers under rationalism + all bldgs, versus 3 beakers using just mass libraries.
Yes, research lab and hydro plant are quite late, but assuming you enter modern age by beelining to plastics (which is the best non-military entry in modern age), you can get them reasonably fast relative to the end of the game.
Yes, this all depends on the right SPs, but that's the benefit of going with a small number of cities vs. ICS. This all requires very good circumstances for the megacity civ, but you can see how under ideal conditions the ICS isn't too far ahead in research. Similar arguments can be made for production and gold.