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.
As other people have mentioned, this can be a hard problem.
However, malls are typically surrounded by massive amounts of space used for parking. There is a plan for the largest mall in my region to convert all of that land into residential spaces, 2000 apartments. The parking will be moving underground.
Would be even better if instead of 2000 apartments, it was something like 1100 condos, then the rest split between offices, shops (including groceries), parks, and some sort of community recreation center. Do the same with the surrounding area, changing up the specialties of the locations a bit so that it's worth it to leave your mall-sized area and visit others.
Then set up a mass transit system that goes between them, including consideration for people wanting to move large purchases like furniture and appliances, like one of the cars on the train has large doors, collapsible seats, and hardware for securing things too big for one person to safely hold. Or set up a parallel delivery system for things while the people ride the delivery system for people.
Then you don't need the underground to go to parking and can increase the density of the area or put more space towards parks and recreation.
Yeah the malls themselves are hard to convert. Ditto for those unused office buildings downtown. Takes a lot of work to change commercial space into residential.
Easier to start from scratch, honestly. Those empty parking lots make it simple to put up medium density housing, and then put commercial spaces back into the mall. Aka the Reston Town Center model.