Could we get the same kinds of spin-off technologies if we reallocated NASA's budget to prioritize technology development over, say, planetary exploration?
I'm not anti-space... and I think it's important for us, as a society, to reach for the heavens. I also think, however, that it would not hold humanity back much in the grand scheme of things if we stopped exploring planets for, say, the next 50-100 years.
Not really. The private sector is really good at technology development, i.e. take an idea and figure out how to mass produce it at low cost.
What you want government funding for is fundamental research. Which space is good at because of the constraints.
Normally if you can't fit your payload on the truck, you send a second truck. That costs another $100, so it's not worth it to you to spend ten million dollars to figure out how to make it work with one truck, even if you figuring out will save a hundred million other people a hundred dollars each.
With space, you can't just send another ten billion dollar rocket, so you do the ten million in research and actually solve the problem, and we get the piece of new technology that everybody can also use for other things.
"Necessity is the mother of invention." It's hot, it's cold, it's far away, adding a kilo costs nine kilos of rocket fuel, oxygen is scarce, gravity is different, etc. You need the constraints to force an invention instead of just suffering the status quo and covering for the inefficiency with brute force.
You actually have to go to Mars or there is no impetus to invent the technology required to go to Mars.
Without that you have two problems.
The first is that there is no goal, so nobody knows what to work towards, so you get undirected research that never goes anywhere. This is the problem the NIH and NSF have -- they fund a lot of research and 5% of it is brilliant but 95% of it is not.
The second is that there are other goals, but they're pedestrian. So there is money and somebody figures out how to divert it to their own business, and it ends up funding research that would have otherwise been done by the private sector if those companies' lobbyists hadn't figured out how to get the government to foot the bill instead. Which doesn't grow the pie at all, it just transfers tax money to well-heeled companies with good lobbyists.
Plus, I mean, we get to go to Mars. How is that not awesome enough to justify <1% of the federal budget? Spend a different <1% of the federal budget on the thing you wanted.
Effort isn't necessarily a zero-sum game, and necessity as the mother of invention has some truth to it.
The problem you're identifying is completely independent of exploration. If we spent more on cancer and nothing on space then we would have more medicine-related technologies and fewer of these:
https://en.wikipedia.org/wiki/NASA_spinoff_technologies
But that doesn't have anything to do with what you're objecting to. Look at the HIV drugs the west has access to and Africa doesn't.
And even if the benefit goes 90% to western countries and only 10% to poorer countries, how is that not still better for everyone than using the money to build military drones or ad tracking systems or something equally useless if not actively harmful?