So - you are assuming that space science is solely NASA then?
No. They're just the lion's share. My view is that for space science, they probably outweigh the rest of the planet, including the DoD's expenditures on space science.
What about developing the engineering and technological means to allow for long stays on the moon? Spend 5-10 years researching astronaut safety, building materials, biospheres, ecological and environmental surveys for using natural resources - then go to the moon for extended stays of weeks and months? Using this technology to then go to Mars? It is the choice of where to put the limited funds for the next 5 years, 10 years... where will it be of the most use?
Personally, I'd rather the US's budget were reduced by a factor of two or three. Elimination of NASA funding as a side effect would be acceptable. But since it isn't going to happen, yes, with the proviso that extended stays mean stays of years, not weeks or months. Unmanned space science missions should take advantage of well known economies of scale (such as reuse of technology and standardized components, building more probes at a time to spread out development costs, and missions that favor smaller, more frequent launches over larger, less frequent launches. And such research should support US economic needs, such as figuring out how to make money from activities and resources in space.