Hard-up, hard-drinking students living under one roof were once a rich source of comedy -- think "The Young Ones" or "Animal House." But the money-making opportunities from an increasingly international, mobile and debt-laden part of the population have turned student housing into a serious asset class. Growing pressure on demand could well spoil the frat party.

Global investment in student digs has ballooned in recent years from $3 billion in 2007 to about $7 billion in 2015, according to McKinsey. The U.K. -- where student debt has doubled in five years to 100 billion pounds ($129 billion) -- attracted billions last year from investors such as Singapore's sovereign wealth fund and the Canada Pension Plan Investment Board.

Investors and property experts reckon Continental Europe will be the next Eldorado: Dubai-based fund GSA has invested in Germany and Spain, where insurers AXA and NN are said to be eyeing assets, according to Bloomberg News. These are nascent markets, less crowded than mainstays like Britain or North America. The aim is to export a tried and tested model.

There are sound reasons behind the euphoria. In a world where interest rates are still low and funds have cash to park, there's something to be said for the resilience of student housing -- though the past financial woes of some British providers suggest that calling it "recession-proof" is a stretch.

Average investment yields have held firm at around 6 to 7 percent in Britain since 2008, according to Savills, close to U.S. levels. Education overall had a good crisis: People went back to school or stayed there longer, reluctant to face a tough job market. As tuition fees rose in the U.K. and U.S., so did room rents.

But the past decade's boom is starting to show signs of exhaustion. The rise of the upwardly mobile international student, funded by the Bank of Mom and Dad as well as student loans, isn't inexorable. It runs counter to anti-immigrant rhetoric and policy from the Trump administration and Brexit Britain, for one thing. Numbers of international student enrollments have started to fall in the U.S., according to some surveys. They have also fallen in the U.K., where Prime Minister Theresa May has resisted calls to exempt students from immigration cuts. Jobs in the City of London and on Wall Street, once a clarion call for finance degrees and MBAs, aren't as plentiful as they were.

Some of the domestic support for the education boom is also unraveling. A recovering U.S. economy means people are less willing to throw money at higher education; the explosion in student debt is pushing interest rates higher, with the cost of a $10,000 loan rising by an estimated $400 this year. The cost of education in the U.K. is also now a hot political topic, with Labour's Jeremy Corbyn promising to scrap tuition fees and May's former political adviser calling the current model a "Ponzi scheme." Accommodation costs might have stretched too far for some, prompting protests from students.

None of this means that the market is rife with oversupply just yet, especially in Europe. And behind a lot of today's student generation -- "Generation Z" -- lies a lucrative inheritance from the baby boomers, with investors keen to tap what they see as an epic transfer of over $40 trillion of wealth. As long as higher education remains a must-have for future employment, families will likely keep going on supporting their offspring.

For those who imagine the education boom will last forever, the warnings are there, and the changing winds of politics are the likeliest threat.

This column was provided by Bloomberg News and does not necessarily reflect the opinion of Bloomberg LP and its owners.