I've wondered why embedded tends to pay lower. C++ (and C) tend to be 'harder' languages for the average mainstream developer, particularly web developers. I guess I expect embedded jobs to pay more, yet they don't and like you said, pay less.
I started as an embedded software engineer in the early 90's, and at the time there were lots of well paying jobs compared to other software engineering diciplines.
In the 2ks/10's, at least in my area, embedded jobs dried up. Mobile development produced a lot of very high performance SoCs that were cheap, and had high quality already developed middleware layers (Android for instance). They sort of conquered a lot of the embedded media processing space I was an expert in.
As a result I jumped ship to mobile, but it was much higher level programming far away from the SoC, and most of the lower level code was being written in China/South Korea.
This basically meant for the engineers that weren't able to shift, they basically weren't scouting around for, or finding other jobs (in general).
So even though there is a small pool of engineers with these skills, a lot of people left the embedded space at a time when some of those jobs are starting to shift back, leaving a shortfall, but also a pay gap.
Yea, I moved from embedded to mobile (iOS) development pretty quickly. Similar problems/constraints but the tooling was an order of magnitude better. No more cobbling together non-working cross-compilers from some vendor's crappy BSP and praying they produced binaries that worked.
But why is that?