TBH it depends entirely on how the clause in the contract is written
'Termination may be provided by notice no later than the 10th of June of each season' means that Messi has missed the window. 'Termination may be provided by notice no later than one week after the last competitive match of the season' means Messi is fine.
This will get into lawyers arguing about the spirit of the clause versus the letter of the clause, and at some point it'll go to arbitration or ECHR to decide if the spirit or the letter wins.
Problem is, a lot of these contracts arent drawn up with things like COVID in mind, tbh. Look at all the issues around TV rights - broadcasters saying they were promised X many games, etc etc. I'm sure a lot of this will be drawn out for a while to resolve all compensation and penalty clauses.
Which is why I think either Messi will move for a transfer fee or stay. I think staying is quite unlikely because it means he'd gone through all this public stuff - and he's not gonna go to a top club in a year's time unless he performs really well, unless he really thinks he can go till he's 38 or 40. Now is the time to move