> A “puny” $22.6bn buys a lot of food and houses a lot of homeless people.
This is reductive line of thinking. You can't equate spending on cutting edge research with taking away from welfare. Earth has finite resources and you need to be forward looking as well while taking care of the present.
Also, it is not like all the research benefits just space exploration or MIC. For instance, research into hydroponics is being used on earth now to grow food with much less resources.