If malls continue to shut down and decay over the next twenty years, someone should turn them into retirement communities for GenX and Millennials.
Imagine apartments built into what used to be department stores, (Oh, you're JC Penny 203? I'm at Sears 106). Get those old arcades up and running. Set up meal stations at the food court. Once people actually live there, stores will start to move back in.
If I'm unable to finish my life in my own home, that doesn't sound like a terrible option.
That would be really good, but this idea has been explored and unfortunately it is only viable on a very narrow amount of buildings. Most malls aren't properly built to be housing and the costs of adapting them for housing exceed the cost of just building new housing elsewhere. And the costs of tearing it down and rebuilding are even greater. Overall, Malls are economic net negatives for communities, all single use infrastructure constructions are.
A cheap / half assed conversion would be a ghetto. It would be awful.
Sanitation would be a huge problem also. In an apartment you have access to air from the outside. Imagine everyone living in a box in the same enclosed space. Yes I understand malls have gargantuan (and expensive) air conditioning systems. It would still stink.
Not to mention the money. Even a derelict mall is still worth many millions of dollars. You have to buy or lease the building from them.
You'd be much better off creating a walkable community of low-cost housing in a low-density semi-rural area.