In order to make this argument, you have to first figure out what percentage of NASA's budget is spent on space exploration versus things like GPS systems, weather satellites, climate monitoring, solar monitoring, physics experiments, etc etc, which have direct or indirect benefits to things happening here on earth.
NASA's budget for entire actual space exploration would be more-or-less a rounding error on our defense budget which routinely has $5b projects which benefits very few people and arguably makes the quality of life worse on our planet.