Doctors are paid "OK" once they become consultants.
Teachers are not unless they are head teachers.
To be honest it sounds like you've only done a few years of actual work so >£40k is not that bad. It's not a junior salary. 3 years of PG study (do you have an MSc yet?) is all well and good but that in itself doesn't make the powers that be fall over themselves to hand over big wedges of cash. I did 4 years of PG study but didn't expect that to give me more money, it didn't suddenly make me significantly better at my job or more intelligent. Pharmacists are relatively well paid (band 8?) for healthcare compared to nursing etc.
I sound a bit negative here and you're self-aware enough to acknowledge that you may sound ungrateful but I guess the point I'm making is that your nearly 8 years of study and intensive training doesn't give you a divine right to a £50k+ job. If it's public sector(?) then it's a fait accompli anyway you are stuck with whatever the band/increments say and you'll never break out of that no matter how many letters after your name or pieces of paper you can flourish. If it's private sector then you need to look at what a realistic target role is to get the money you think you deserve is. It won't come knocking on your door, you need to go out and find it, and keep in mind if the state of healthcare is as you describe there may be a dozen other applicants in the same boat all wanting some progression for that tiny number of senior roles, they tick all the boxes, they've got MSc this and PhD that, they've written relevant papers, they've got a 2:1 or above and straight As at A-level.
The boom in junior progression in data/IT is a relatively new phenomenon, it used to take longer to move up that ladder but for sure there are a lot of shortcuts being taken now. What took 10 years in the noughties/deccies takes 5 years in the deccies/twenties.