Thanks. As I (very much not an expert, which is why I asked the original question), Mexican law generally says that you almost always owe income taxes on income from Mexican sources even if you are a nonresident. Makes sense.
If you are a non-citizen resident of Mexico, you owe taxes on worldwide income (with possible exceptions for social security and possibly pensions).
Their definition of "resident" seems to be either that you spend more than 183 days in the country OR your "center of vital interests" is in Mexico (which I believe means main home, bank accounts, any brick-and-mortar business, etc.). If that is the case, you are probably a resident even if you spend less than 183 days in the country.
There is a tax treaty between the U.S. and Mexico which is supposed to eliminate the danger of double taxation, even though the U.S. normally taxes citizens on worldwide income.
As far as I can see, the main concern for people working remotely from Mexico for U.S. companies (apart from the hassle and probable expense of figuring out the paperwork at tax time) is that for what would be fairly modest salaries by U.S. standards can be relatively high by Mexican standards, and since Mexican income taxes are progressive, Mexican taxes are likely to be higher for those individuals.
But, as others have pointed out, this is obviously an evolving situation. I don't think any of the law really contemplated the issue of remote work via the internet), and certainly nobody was expecting a pandemic. So it may well be (although I don't know this) that for practical reasons, the Mexican government has made a decision not to prioritize collecting taxes from people in this situation.
But I really have no idea about that, and while I might not worry about things too much for an extra few months in Mexico, I wouldn't be willing to count on the situation's continuing this way forever.
Thanks to all who have replied.