Should we instead force the scientists working on this to abandon space research to "fix the ills of the world" so they do "something useful" instead?
I honestly don't know what people who keep complaining about scientific research, especially space exploration, want. It is not those billions spent to send a probe to Europa the cause or the solution to the world's problems. Hint: it is not money the cause nor the solution to the world's problems, nor are drive-by social media activists complaining about it.
In comparison, many other branches of science work on much leaner budgets, and sending stuff to space actually does look very wasteful from a "$ per paper" perspective. If you disregard the weapons development value, there is actually very little reason to do these big-money experiments that could instead support the research of hundreds or thousands of more frugal science experiments.
At the same time, there are lots of ways to do space research more cheaply, like launching small satellites. Most of the people who don't like this stuff are against the billion-dollar single missions rather than against astrophysics or against the concept of sending things to space. Many of them also are against the FCC project at CERN, for example.