What I meant is that people living on a moon base (or some other hostile environment) are not going to be able to rely on things like frequent deliveries or running power lines from the nearest hydroelectric dam. They'd need to produce their own power (without relying on fuel shipments), grow their own food (to supplement diets), recycle water and air, maybe even make their own. Point is, this isn't stuff you try to do on the fly. You need preparation and testing done on Earth, and the techniques we learn could improve life down here as well as up there.
Education: The problem is that many schools already do not get enough funding. If schools could afford things like science labs and decent computers (instead of barely being able to buy enough paper), students would be more interested in learning and pursue those science-y careers you were talking about. We can't build a moon base using a bunch of fast-food workers, so education comes first (maybe with some reforms to solve those problems you alluded to).
Economy: I fail to see how sinking billions of dollars into something like a moon base will fix our own economy. Unless you anticipate being one of the lucky colonists, you'll still have to deal with the massive debt and constant budget cuts. Making sure we don't collapse and become a third-world country is priority numero uno.
I will grant you the science and knowledge point, because you're right; the space race greatly expanded our technological abilities and helped a lot of people all over the world begin to dream big.