They still have the highest revenues in the world and both teams are stacked with talented young players. Pedri, Fati, Trincao, de Jong, Puig, Ilaix, Mingueza, Araujo, Dest, Vinicius, Rodrygo, Valverde, Militao, Mendy, ... The reason Real is broke is also the 800m € stadium that will increase their revenues significantly again, too.
After all they could just sign nobody for a few seasons, reduce their debts and would probably still qualify for the CL. Probably lose some ground on the European runner ups but be financially healthy again. But it's more likely that they'll just reduce their spendings but still buy a player here and there, try to sign a few on a free, etc. to stay competitive and get a some shots at titles.
For second tier clubs, now is the time to gain ground. The big dogs are broke, the smaller clubs can now cling onto their star players, maybe get an extension in for a better salary since there won't be absolutely crazy offers from Barca and co.