I dont have my finger to the pulse of other specialties, but at least with regards to hospital medicine- you can take any salary survey across any 10-20 year range since the 90s and you'll find that our salaries have risen by close to double the rate of inflation. 200k in 2005 is 313k today, which happens to be right around the nation wide average total compensation. Obviously I don't think this that rate is sustainable. I also do think that trend has decelerated since 2020 and future surveys will probably show some flattening, but for now it's tough to argue with these strong numbers.
I do think that comparison is the thief of joy.
It was particularly frustrating in March 2020 when my spouse who is in health care was the only one of their friend group to have been furloughed. The rest are in sales, marketing, business, finance, tech, law. Most of them are in the 150-250k range. They've been making 6 figures since their mid 20s. They were all thriving working from home spending all the time in the world with their kids while I was changing in the garage and took a full shower before I could even see mine. But it doesn't take more than looking at the wide layoffs in tech this past year to appreciate the utter rock solid job security. My dad's a software engineer, his salary is probably on par with a hospitalist except he only had to get a bachelor's degree to make it. But every single year since I've known him, it's always been "this is the year I'll be laid off". Ageism is also a huge issue in tech, and he's always mentioned how difficult to impossible it would be to find a job at his age. Ask your older non medical friends what is was like to live through 2008-2010 and youll get some perspective. I feel fortunate that layoffs in medicine are virtually unheard of and age/experience aren't a liability.
I will say what I appreciate financially about this job is the ability to dial in exactly what I want to make. If I want to make an extra 100k, all I have to do is pick up 3-4 extra shifts a month. want to make an extra 100k in any of those other fields? you'll need to switch jobs or get a promotion.