But spending on education and healthcare is infinitely more important than spending on NASA.
I wouldn't say infinitely, but the manned space program has done nothing of value in the past three decades that could not have been done at least as well and at less expense as unmanned missions.
There is only one space mission for which humans are needed for, colonization, and we aren't pursuing that. At best we're doing a bit of space tourism. If we want to be serious about space, we should make the following our mission: Send married fertile couples to Mars and leave them there to found a colony. No return flights are needed for the mission and they would raise the cost astronomically (no pun intended).
Yes, the manned programs are too costly since we have to get them back safely/ hold ourselves to a higher standard to ensure nothing goes wrong. Exploration by robots is better. If something goes wrong, then oh well. It doesn't become a tragedy.