I'll speak mostly to the engineering side of STEM....
We don't produce enough engineers in North America, that part is true. But the ones we do produce are excellent, the best in the world.
I work with local, national and large international engineering firms and all levels of government. They are all trying to hire. American and Canadian engineers are in huge demand because they get a great education, graduate, hit the ground running and there is a proven track record of success. Surviving a North American engineering university program is almost proof enough of the grads' abilities and work ethic. Can't say the same about foreign engineering grads. It's hit or miss with more misses than hits. Anecdotally, one of my boys is currently in an engineering program and while in 2nd year he already had multiple full time job offers for after graduation. The market is incredibly tough for employers but the job market for NA engineering grads is phenomenal. Honestly, you could be an average NA engineering grad and you will probably have a really good job for the rest of your working life. That's the sort of demand you're graduating into these days.
As to why more people don't go into STEM programs in North America, reason #1 is because it's hard. It takes effort and commitment. A lot of kids aren't looking for that. That's the truth. They see idiot influencers, and social media celebrities with little intelligence making millions doing nothing but posting about their favourite makeup products or streaming themselves playing video games. So why put yourself through 4 years of hell, and let's face it, engineering school can feel like that at times especially that first year, when there is a perceived easier path.
We aren't going to social engineer our way to a solution by forcing kids into STEM like you suggest. That's just dumb. But we do need to recognize the challenges of getting high school kids excited about STEM and then once they are, keeping them in through the university undergrad program and into their careers. There are ways to incentivize that need to be explored and promoted. But that's a much longer post.