The only real downside of the M340i against the rest of the range is the purchase price. They are considerably more expensive, especially if you want a reasonably high specification example.
But once you've got past that, the rest of the car is largely the same to run as the rest of the range. They are fuel efficient, the tyres cost the same as they do on the rest of the range, the servicing isn't much difference, etc.
I have xDrive and to be honest, I've been surprised - I didn't want it, I've never been a fan of it but with the M340i there was no choice but now I have it I never really notice its there. I am not sure I would go out of my way to get it in a car that was available as a rear wheel drive, though.
xDrive is not available on the 330i for some reason.
The thing to be aware of when buying a normal version of the 3 Series is that during the production issues between 2021 and 2022 a lot of the equipment was not available - for example, the head up display and the upgraded stereo was only available on the M340i - so if you find a late 2021 car with a technology pack you'll probably find it contains less than you'd hope.
If you are looking at 2019/2020 cars this won't be a problem but newer than that and this will become an issue for you.
I can never decide what I think about the plug in hybrid. I like the idea, but in practice I am not sure if I'd want to buy a used one. They existed for the company car market - which moved almost entirely to them from diesel in the 3 Series because of the way the tax worked on plug in hybrid cars. So, most will be former fleet cars and it may be difficult to find one in the specification you want. They are also more complex than the rest of the cars in the range so as time goes on I'd be increasingly more concerned about how reliable the hybrid system would end up being. The battery, for example, is not covered by the extended warranty.
I am not the only person who thinks this, so consequently the effect on the residual values has been quite noticeable. As a result, they are really quite cheap - perhaps cheap enough to be worth it. I don't know. I have a different opinion on these each time I think about them.