Barcelona can probably roll the loans onwards to avoid being bankrupt. They've done it successfully for years. Also, if they are allowed fans in the ground again their turnover will go up this year.
The Messi thing is that La Liga have a hard salary cap based on a percentage of the club's turnover the previous season, and they won't let you register any new players if you are over it. Because of Covid, their turnover last year was significantly down, but their wage bill is huge. That means that they need to get players off the bill before they can officially register the new signings from this summer - Messi, Aguero, Depay, Garcia(?). I don't think those numbers can be squared, even with Messi taking a giant pay cut (don't feel too sorry for him, it's from 45m Euro to 20m Euro a year). So if La Liga won't budge, Barca aren't going to be able to keep Messi, even if both the player and the club want to make it work.