In MLS they have "the Beckham Rule"...
The Designated Player Rule, nicknamed the Beckham Rule, allows Major League Soccer franchises to sign up to three players that would be considered outside their salary cap (either by offering the player higher wages or by paying a transfer fee for the player). The rule, which was adopted ahead of the 2007 MLS season, enables teams to compete for star players in the international soccer market. The rule is one of two mechanisms by which MLS teams may exceed their salary cap, the other being allocation money. As of December 2019, there have been 209 Designated Players in league history.
...
and the highest paid DP (and so MLS) player in history is Gonzalo Higuain ($8.8m).
https://bolavip.com/en/soccer/mls-top-10-highest-paid-players-20200914-0002.html
(Don't know why Ibra is not mentioned but he was earning $7.2m in his second season with LA Galaxy.
https://www.si.com/soccer/2019/06/12/mls-salary-list-zlatan-ibrahimovic-record-players-association)
So while in theory there is nothing to prevent Inter Miami paying Messi 20m I doubt this would happen. He'd surely become the best paid player in MLS history though. But he won't go to America for high wages (I'm sure he could get a much better contract in Qatar or China) but for money he'll get for image rights (MLS would get on a totally different level with Messi playing there). And because he seems to like Miami and wants to live there for a few years with his familly.
I know you were joking so don't need to explain why Inter Miami loaning him to Barcelona would never work. Neither MLS nor La Liga would allow that. UEFA (with whom we're not on the best terms right now for known reasons) and/or FIFA could get involved too.
I was thinking about this too some time ago but problem is we need to (re)negotiate a lot of sponsorship deals and we'll get more money if Messi will be tied to the club longterm than just on a 1-year contract. Although I'm sure most sponsors will try to include "a Messi clause" paying us less money if Messi leaves in 2-3 years which still most people expect him to do even if he'll sign a 5-year contract.