I wasn't even talking about the course quality (which as you note, is very variable) but about the curriculum.
One thing you can do as an individual teaching yourself CS, say, is to try and follow the curriculum of a known good CS program. There are issues with this, too, but at least you are getting some guidance.
The opportunity cost issue is a good point. One problem with following undergrad programs, say, is that only part of what they are doing is teaching you material, the other part is learning-how-to-learn stuff. If you are an independent learner of sufficient skill, some courses will be way too slow for you.
It would be optimal in some sense to have high level "key concept" material that you can survey efficiently and then decide when and where you need to dig deeper. It's a bit of a chicken and egg problem though, because if you are insufficiently skilled you will do poorly at the second part...
Of course given the libraries and systems already available, you don't practically need a lot of this knowledge, but it does help. When certain portions of an application just don't perform well, or when you hit really weird side effects of race conditions on static properties etc. I think it's also important to know the language and tools that you are working with as well as possible. It's not always possible to know everything, but you should probably read and complete at least one book on the language you are using. You can hack away in any given language for years. But until you've actually read cover to cover on a comprehensive book, you won't necessarily understand some concepts, or better still you will learn how the language does something for you, that you've been doing the hard way.