In my experience, pretty much all software engineering positions pay better than hardware engineering positions with equivalent experience. I don't fully understand why, as hardware is hard and if you have a really good hardware engineering team you can shave months off your time to market, so those engineers should be just as valuable to a business as systems/embedded software people.
Based on that people end up earning what they consider "a comfortable wage". Some people are not going to feel comfortable until they can buy a jet for their acro-flying hobby, some are happy when they can afford to easily save 1 year of income and being able to afford to buy a new pc every 3 years.
Other people have no idea these opportunities exist and they are miserable working in one place for a decade. Or they are not willing or can't take risks.
That's how we end up with two people doing similar jobs one earning $100k and the other $500k. In days of remote work the biggest differentiating factor in the earning potential IMO is your English (if not a native speaker) and willingness to work in timezones 6h+ away.
But you are right; the hardware market is harder than making web stuff. I just enjoy hardware/firmware more. Currently I am starting a new hardware/firmware project for a US company that will last 3 years with this income.
It depends where you live, spend and how you count; i optimised everything for the past 25+ years around making sure I never have to think about money if I would drop everything today. Your situation might be very different of course.
I think it has to do with the VC faucet, a completely irrational capital allocation mechanism.
Consider a senior SWE at e.g. NVIDIA making $300k, let's say halfsies split between base and RSU. The $150k RSU grant from a few years ago that still hasn't fully vested is worth $1M now. So even for a 50% increase in nominal total comp, it doesn't make financial sense to switch.
I don't know that anyone can afford to pay their engineers 10x more than the competition, and then also offer a cheaper product with thinner margins.
That disrupts the organization because the hardware people are arguably smarter and more talented than software people. They have actual engineering degrees.
A good software org has to value its people. A good hardware org is a manufacturing operation tries to minimize personnel costs.