The student loan thing (and the cost inflation) is definitely part of it.
I'd also point to globalization and technological changes - unskilled labor is less valuable when there's more supply from automation and outsourcing. And technology has enabled more consolidation even on the nation level - it's now easier for one company to service the entire market; think Amazon vs local shops, or Uber vs local taxi companies. Better communication and transport joins many local markets into one big market and creates fewer, bigger winners.
Land use policies probably have something to do with it too. Historically in the US people have moved from place to place for economic opportunities as new industries developed. But doing new urban development is more difficult than it used to be and supply is added very slowly. The areas with the most global companies and economic opportunities are mostly a handful of cities, but the cost has become prohibitive for new entrants that aren't skilled professionals (despite there being plenty of regular jobs available with higher wages). And of course the people already living there get squeezed too.