I do think exploration continuing is important and developing the technologies to explore via travel and telescope important, but I also think it's kind of silly to think about terraforming the moon or Mars as a real solution to anything, considering the enormous amount of resources and time required for such an undertaking, given that it's the most far-fetched thing we will ever have attempted by far (that includes landing rovers). I mean it's a true 1000-to-1 shot that the pipe-dreams people like Zubrin always run their mouth about will ever happen. Doesn't mean we can't experiment with very small colonies of people and some type of greenhouse-like biosphere or something in the next 50 years, but as a solution to solving what's going on with our planet, it's a pretty weak theory.
I think a lot of that money would be much better spent here (where we already have a wonderfully terraformed planet), perfecting cleaner ways to burn fuel, alternative energy, earth sciences, etc. Much better to try and do everything humanly possible to spare this planet than to assume we'll be able to terraform another and somehow colonize there successfully in the next 100+ years.
...into the light of a dark black night.