It pretty rarely actually costs $100K unless you either 1) go to an expensive private or out-of-state university or 2) don't have good ACT/SAT scores or a good grades from high school/etc. Most people will pay around half the "advertised price" for a state-school STEM degree with various scholarships and grants, which, considering entry-level geo-STEM jobs start around $70K (to upwards of $100K if you are mobile or get in a very high-demand STEM field), will be meet ROI within ~10 months of working and pay dividends for 30+ years after that if you are still in your 20s when you start. Also my undergrad engineering degree was 128 credit hours and completed in 4 years plus one summer where I took 3 classes. That behind said, we still started 529 plans for both of our kids as soon as they were born.
For my area in particular, it would be incredibly hard to learn it "on the job". A lot of it is theory based and difficult to pick up without a graduate degree that goes into the fundamentals. One also can't legally practice my profession without a professional engineering license for each state they practice in, which (you guessed it) requires an accredited degree and two 8-hour tests to get (plus some other hoops). But, not every field is like that, some are more application/practice based and can be learned on the fly. Or they may not have the professional licensure hurdles, and are therefore easier to enter from an alternate starting point.