Software engineers are concentrated in major metropolitan areas, often high cost ones (e.g. the SF bay area), so comparisons to the national median income are not necessarily accurate.
You would need to compare it to other professions lawyers/medical doctors and other types of engineers - and I woudl bet that the median for those working in the tech industry's is lower than MD's and lawyers
A Ceng/PE has the same requirements as a MD or lawyer arguably more so in the case of lawyers - but a Ceng or PE will earn less than a MD or lawyer for the same level of experience
And dont you need a First from a good university to stand a good chance of high paying job in SV?