You rarely talk to anyone who says "I want to make a lot of money so I'm going to be a researcher!"
Normally people (want to) become scientists because they are passionate about science.
The problem is that science is not highly valued, especially academically. We live in a society that values trading commodities, and science isn't easily commoditized. The closest thing we can come to a commodity in science is papers, and maybe patents in the commercial world.
The shame is that science is a public benefit. In our whole history, nearly everything is ephemeral, but the things we have learned and understood and documented have persisted. Technology can be good or bad, but (well founded) science is knowledge, and it's only ever good as it lets us better understand.
We live inefficiently as long as we focus on letting people live comfortable lives only when they have something they can restrict access to and barter in exchange for that opportunity.
There are people out there that would like to do science, who would like to further our understanding of the world and universe we live in, who don't do so only because they need to help produce something that people will pay for.
In my opinion, we should pay for education and a fair income for any person who wants to practice academics. Sure, you can save luxurious salaries and budgets for the superstars, but make it such that everyone who has the capability and desire to do so can work in science, or possibly other academic pursuits, that they will have a wage that will let them have a home, healthy food on the table, support a family and live a comfortable, if modest life. The condition being that all of your results are made available to the public for free and you might get called to teach.
I think of it kind of like being in the military. Enough money gets spent on the military, TONS of money gets spent on the military, and for much of it, the public sees minor benefit. But you know that when you join, that at least while you're serving, you are going to be guaranteed to have a place to stay, food to eat, health care, education options. Nearly anyone who is fit can join.
If you could do the same for science, I think that would be great. Our governance would need to change first though, and our culture. I don't trust that government employed scientists give good results over lies to promote an agenda. At least in our current private economy you have conflicting interests that can act as oversight.
But as automation and technology supply more of our needs with less labour, we're losing more and more jobs. This leads to people without jobs. If there are people in that group that are smart enough to be scientists, there's always room for more science.