Similar, but different - my current house, for some reason, has a 40A breaker and a 14-50 outlet (this was installed by the builder, and is the same for all of the houses in my neighborhood).
Ah, that one. Yes, that is an allowed condition in NEC. There isn't a 40A receptacle type, so they do allow using a 50A receptacle type on a 40A rated circuit like what you described, and that was very commonly done for ovens.
I have the old (from 2017) mobile connector, which can draw up to 40A, which would be too much for this circuit configuration.
Yup, and I am over 75% sure that these common installations is why Tesla made their 2nd generation mobile connector only able to draw 32A maximum. They didn't want people plugging 14-50 plugs into existing outlets and overdrawing.
So I just set the car to draw 32A, and everything is fine.
Well, it's fine until it doesn't work, and then hopefully the breaker trips. That manually dialed down setting in the car isn't super reliable for long term daily use, as it can not work or get reset for various reasons like software updates, or the car's GPS drifts a little and doesn't recognize it's supposed to be at your house to use that saved setting, etc.
So it would be nice to have something a bit more foolproof on that if it's just 40A rated wire, like 8 gauge Romex or something. Either a wall connector set for a 40A circuit, or getting a newer 2nd gen mobile connector cord that can only draw 32A would be a little safer and more reliable than counting on the manually dialed down setting on the car's screen or mobile app.