Update: it apparently wasn’t the cartridge or the valve. The body of the faucet must have been faulty.
Moen sent me a replacement cartridge, and I installed it, to no effect at all. So I called up Moen and they asked me if I had flushed the line prior to installing the new cartridge and I said I had not. (I had thought this was only necessary if replacing a cartridge in an otherwise old faucet, not in new one.) So they said that’s probably the problem but it’s too late to do it now because the new cartridge might have been ruined, so they sent me another one. When I installed that one after flushing the line, the problem wasn’t solved but what was weird was that it changed somewhat. Previously the hot water worked properly and the cold was very slow; now the cold was somewhat improved but the hot flow slowed down to match the cold. (I had been measuring by timing how long it took to fill up a ~36 oz. container. Previously the hot was about 11-12 seconds and the cold ~23 seconds; now they were both ~16-17 seconds.)
So I called Moen and they said OK, they’ll just send me a replacement faucet, which they did. Installed it yesterday morning and all is well.
I’m guessing that there was some obstruction loose inside the body of the faucet at around the point of the spout, and that it could be moved back and forth from blocking the cold to the hot by changes in pressure. Or something.
Once I was busy under the sink anyway, I took the advice of some posters in this thread and replaced the hot water shutoff valve with a ball valve, so I have new and better valves on both lines now.
Overall it was an educational experience. Thanks to all for the advice.