I don't think there is a solution. In all seriousness, if I were starting my career from scratch today, I would avoid anything that can be done purely remotely, and quite likely go into a skilled trade - Not romanticizing "hands-on" work, I realize it has its own down-sides, but it's becoming increasingly clear we'll still have elevator techs and plumbers longer than we'll have programmers and accountants.
AI has effectively already killed white collar jobs going forward, whether or not those outside tech have noticed yet. It can more-or-less replace junior-level workers today, and with no juniors there will be no seniors later and no principals twenty+ years from now. Though even if we somehow find a way to backfill the experience pipeline, I have little doubt AI will be coming for even the best of us within a decade. Maybe it'll hit some unforeseen ceiling before then, but that's not a bet I'm eager to take.