It doesn't have to be "plan & build it within 12 months, and don't worry about anything but apartment buildings". It's not a new problem, it's been a constant topic (here, in Germany) for at least 15 years, with every year ending with "we have 2000 new apartments, but we need 20000 a year to keep up with demand". And city planners put their hands into their pockets and say "well, you can't rush these things..."
What will come first: commercial cold fusion energy or a return to actually building housing in Western cities?
A very practical reason: most of that available space is a desert, and people tend to prefer not living in a desert.
And also because European nations are much more developed, have much stronger economies, allow much more freedom etc etc. There's a reason why migration is a one-way-street.
People have been living around Cairo for millions of years. There are reasons why migration is a one-way street but they can change. There are millions of under-utilized young adults with access to the internet. They will find a way to prosper.
Egypt's natural environment cannot really support strong further growth. If they invest heavily into solar energy and desalination, I'm sure they can create more arable land, but it'll still come at very high capital expenditure compared to other locations.
What's your prediction here, Egypt, Morocco and Algeria overtaking Germany, France and Italy with regards to economy, science etc (broadly "development") and drawing migration from Europe? In what time frame, by 2050?
2050 is possible. There is no need for arable land if food is imported. People will want to live where the nicer weather is. Adjusted by air conditioning from cheap electricity, the advantage is in North Africa.
It's not inevitable, but when the competition is cold fusion and building housing in Western cities, I would bet on North Africa.
*edit:
>>>living around Cairo for ~millions~ thousands of years
What will come first: commercial cold fusion energy or a return to actually building housing in Western cities?