One could argue that space could give us a shitload of resources to solve those other issues.
On a related note I would like to plug the meme that "humanity" as a whole is worth shit; what matters is the qualia of actual humans and then other possibly conscious beings. I don't care whether there are humans somewhere in space if we down here die from nuclear holocaust, global warming, aging or hunger. I am not "humanity" and neither is anyone else. We are all individuals striving to survive and not suffer, and sure we can cooperate in that endeavour and create superorganisms to aid us - but the emphasis is on "aid", which is not "enslave". I shit on any superorganism building meme that does not put actual humans or consciousnesses first.
EDIT: typos
The only environmental existential risk (apart from the human extended phenotype of course :) ) is climate-based, no?
Not at all. If we, as a species, don't fix the environment, we aren't going to be around long enough for space exploration to become technologically and economically practical.
Trump's proposed EPA budget is $5.7 billion.
https://en.wikipedia.org/wiki/Budget_of_NASA
https://en.wikipedia.org/wiki/Alaskan_Way_Viaduct_replacemen...
http://www.thenewstribune.com/news/politics-government/artic...
Here are some more examples:
> NASA’s microencapsulating technology enabled the creation of a "Petroleum Remediation Product," which safely cleans petroleum-based pollutants from water.
> In the 1990s, NASA scientists at JPL developed software capable of correcting for GPS signal errors, enabling accuracy within inches. The software is called Real-Time GIPSY (RTG). John Deere licensed the software and used it to develop self-driving farm equipment. As of 2016, as nearly 70% of North American farmland is cultivated by self-driving tractors, which rely on RTG originally developed at NASA.
> Dr. Alain Gachet founded Radar Technologies International (RTI) in 1999 to use satellite generated data to identify probable locations of precious metals and during its use found it could also detect water. The system developed with this data, WATEX, uses about 80 percent of its data inputs from publically available NASA information. This free information allowed RTI to develop the WATEX system to successfully locate water sources, such as in 2004 at refugee camps during the War in Darfur.
> So-called space blankets, developed in 1964 for the space program, are lightweight and reflect infrared radiation. These items are often included in first aid kits.
> Goodyear Tire and Rubber Company developed a fibrous material, five times stronger than steel, for NASA to use in parachute shrouds to soft-land the Viking Lander spacecraft on the Martian surface. Recognizing the durability of the material, Goodyear expanded the technology and went on to produce a new radial tire with a tread life expected to be 10,000 miles (16,000 km) greater than conventional radials.
> Firefighting equipment in the United States is based on lightweight materials developed for the U.S. Space Program. NASA and the National Bureau of Standards created a lightweight breathing system including face mask, frame, harness, and air bottle, using an aluminum composite material developed by NASA for use on rocket casings.
> NASA developed a cloud compute platform to give additional compute and storage resources for its engineers, called Nebula. In July 2010, the Nebula code was released as open source and NASA partnered with Rackspace, to form the OpenStack project.[42] OpenStack is used in the cloud-based products from many companies in the cloud market.
The above is just a small sampling of some of the technologies born or improved by Nasa research. Nasa, of course, is not the only organization in the space research and exploration game. As you can see, research for space exploration almost always has some level of terrestrial utility.