How are we "as a community" going to be able to improve this?

It's ultimately down to the cultural norms of the field, as well as the realities of academic funding.

I was a research software engineer (RSE) for the best part of a decade. The best thing that happened to me was being made redundant when my funding ran out, and being forced to work in industry. What a difference (and wholly for the better).

The reasons you give are all nice positives, but they all ultimately are very emotionally manipulative. You're asking people to act against their own self-interest. But this isn't really for the benefit of humanity. It's for the benefit of the PIs who run the research groups, and keeping their little empires running. But the cost to the individual is great. You're sacrificing salary, a career track, advancing your own skills to the full, and in many cases the opportunity to have a life: being able to afford a home and support a family.

In retrospect I, and many others like me, do feel that we were taken advantage of to some degree.

I spent several years on a massive grant, then several years on lots of small short-term grants (12 months, 6 months, 3 months). You can't risk getting a mortgage when you have no guaranteed employment. And it's also very stressful not knowing if you'll be employed in three months time every three months. And unlike in a company, RSEs don't really have a proper career track. There's no real progression. You're a hired help.

RSEs are not treated equally with academics. Let's be really honest about that. We're not. I even had a PhD in the subject area and you're still beneath all of the "real" academics. We're not "partners" in their work. We're the dogsbody's.

If these people want software developers with real chops to work in the field then they need to pay a competitive salary, have a proper career track, and really fix the job stability. And they also need to properly respect the expertise RSEs bring. Unless all of those are fixed, a career in industry will continue to be the only rational choice.

This won't happen though. Tenured academics refuse to consider paying the going rate because that would mean the "hired help" would be earning considerably more than they do. I had already topped out the salary band when I left, and I was earning more than most of the junior-mid-career academics. They are, of course, on fairly poor salaries. They too would earn vastly more in industry, but are mostly unwilling to consider that option as a rule. Their loss. If they truly respected the value they were getting, then they would pay for it. It will not happen though. Most of academia is about climbing the greasy pole and not about advancing the state of the art; there's just no way they'll permit others to sit higher on the salary pyramid than they do.

At least in industry skill and competence and the ability to deliver are highly-valued, and companies will gladly pay for people who are proven to deliver. In practice the work I do in industry (biomedical) has far more positive impact upon the world than anything I did in the academic niche I used to occupy, and is also vastly more enjoyable, with a lot more responsibility and technical depth.

Are you personally planning to stick it out for the whole of your career? Because if I could give you the advice I would have liked to have given myself, it's that you should properly think about where you want your career to go in the medium to long term, and decide when (not if, but when) you will exit to move to industry. Use it as an opportunity to gain some useful skills, and move on to where your skills will be properly valued.