The experts tell me to transfer--no matter what.
I believe the odds favor more tricks ( or fewer set tricks) in 3Major than remaining in 2NT.
The only way you can get some tricks out of that 5 card Major is to make it the trump suit. The risk is getting to a 4M contract ( when you wanted to "get out" in 3M ) if Opener "super accepts" with a max and 4 card support.
Certainly having a stiff or void increases your chances of actually making the contract.