Why don't we make energy, hunger, and conservation the moonshots themselves instead of trying to make a literal moonshot and hope that we solve those problems as a side effect?
Because those things are incremental things, not all at once things.
We slows transition to nuclear power, not all at once. We slowly provide inorganic fertilizer and irrigation water to everyone, not all at once. We slowly increase living standards so that people have extra energy and money to care about pollution.
So is space exploration, but you can set concrete goals (i.e. produce all of Germany's energy from sustainable sources) that work as moonshots and put the kind of energy and resources behind them that you would put behind a moonshot, and at the end, you have just as much incidental technological development as you would from an actual moonshot, plus sustainable energy production for a G7 country instead of a pointless flag on the moon.
That just brings up another problem and that is defining your goals.
Germany is not using sustainable energy, Germany thinks they are, but they are actually importing their energy from China.
But to get back to the main topic, in a moonshot you need to research and then implement, but here the research is done, it's the implementation that is left - it makes for a very different type of thing. One is exciting and dramatic, the other is slow and plodding.