I agree. The confounding factor (I'm stating the obvious, I know) here is that it's hard to determine what makes a "programmer", whereas there is a very clear set of criteria for what makes a lawyer or doctor.
Although it's always tough to compare fields, I do think that some ways of measuring the skill set and educational requirements for a software developer do place it in one of the most rigorous fields out there.
Majoring in computer science at a reputable university (I don't mean an elite one, I just mean one that requires the standard curriculum) typically requires two years science and engineering track calculus (not the easier one year, slower paced track available to econ or bio majors at some universities). Physics is often a requirement, as is an additional year of upper division mathematics (differential equations, calculus based probability), along with some classes that intersect with mathematics had have a heavy computing component, such as numerical analysis which generally involves computational methods to solve mathematical problems that aren't amenable to closed form solutions, or mathematical algorithms that require so many iterations that they aren't practical to solve by hand, optimization, graph theory. Then you add in compilers, operating systems, and other demanding electives. And keep in mind, CS or other Math/Physics/Eng students typically must take a far more substantial general curriculum in humanities than humanities students must take in quantitive fields. We don't get out of writing papers the way they get out of difficult math.
People often point out that a field like law requires a three year grad degree, but honestly, in many ways, I think is is like comparing people who run at a 8 minute mile pace for 70 minutes vs people who run at a 6 minute mile pace for 40 minutes. You can't just compare the time spent, you have to compare the rigor of that time. Attrition rates for computer science are typically high even in elite schools, including at the graduate level (elite law schools, by contrast, often have attrition rates below one half of one percent, and many of the students come from fields like history or poly sci - nothing wrong with those fields, they are interesting, but they really don't have anywhere near the same attrition rates as CS or related majors). And if you do get a grad degree, then I'd say you've honestly gone through something much more difficult if you did it in Math/CS/Eng/PhysicalScience.
Of course, you don't have to strictly major in CS or a related field to be a programmer, but consider what it takes to get through the google interviews. Try out some of the medium to difficult questions from "cracking the coding interview", and think about the poise, communication skill, analytical ability, and coding ability it takes to do a good job on these question sin 45 minutes at a white board (as an unsuccessful google interviewee myself, I assure you you are expected to make substantial progress on these problems, and medium to difficult is surely fair game!) You could get to this through self-study or formal education, but either way, it most definitely is not a low barrier to entry.
Ok, not everyone works at google, and many of us work on crud apps. However, I have yet to see the mythical "simple crud app" that people refer to when they talk about how most programmers don't have hard jobs. These apps usually don't have deep algorithmic complexity, but they are hard to work with. You often inherit a difficult and poorly documented code base that you need to follow through, logically, with a fine toothed comb. You often have to get up to speed with a new framework, or an older one that uses deprecated methods during an era of substantial churn. You need to tease out often elaborate business logic and calculation pipelines from analysts or other non-technical workers that they have trouble communicating to you. And you often have to do this under intense pressure to provide estimates and meet deadlines, often from people who work in much more predictable fields and see your hesitance to commit as a sign of unreliability or a lack of professionalism. These, in my experience, are the "easy" crud projects. Honestly, I think researching and applying a novel machine learning algorithm to a data set can be a lot easier in many ways.
That turned into a rant, but in short: this is a really hard job (and JoBrad, I hope it's clear to you that none of this is in disagreement to what you wrote, more riffing on the theme here…). Programming it isn't easy at all. I do think the reason that there is an alleged "shortage" is largely due to the fact that people who can handle this kind of work (it requires a huge about of logical reasoning, quantitative reasoning, consulting and working with vague requirements and end users, and presentation skills under pressure) have a lot of options out there. The market is actually working, pay and working conditions need to improve quite a bit to draw people away form those other things they're doing and into programming in the numbers silicon valley employers would like to see. And it won't happen overnight, ramp up time takes a while, this will be (if it happens) a pretty painful transition that will force the tech industry to dig pretty deep.