That's a ridiculous attitude. You could use the same logic to say we should ignore our problems with income inequality until we solve global warming, or vice versa. It turns out there are billions of people on earth with a wide variety of skills and we can do a lot in parallel.
At its peak NASA used 4.41% of the federal budget. In 2014 it was 0.5%. We can afford to do more and as we know from experience the payoff is worth the expense.