I mean, even assuming they spend all the money on better buildings -- if the building is so poorly made that the heat or air conditioning don't work, then that will be distracting, resulting in worse education.
The public school in the town I grew up in had lectures in these shitty trailers that were supposed to be temporary (spoiler: they became permanent). They couldn't afford to hire enough teachers to do small classes, but if they had the money for that, there wouldn't be enough rooms put them in.
I went to public school for a couple years in those trailers. It didn't make any difference. Went to public schools with and without A/C (in Arizona). Didn't make any difference.
The public school in the town I grew up in had lectures in these shitty trailers that were supposed to be temporary (spoiler: they became permanent). They couldn't afford to hire enough teachers to do small classes, but if they had the money for that, there wouldn't be enough rooms put them in.