The Beretta 90-2 is designed around the 9mm cartridge just as the classic 92 is. It will function better in 9mm, and it will be more durable in 9mm. The .40S&W is more powerful in that it tends to penetrate soft targets better and create a larger wound, but most people can control the 9mm better which would be more important in an actual shooting. You should only move up to larger calibers if you can shoot them as rapidly and accurately as you shoot the 9mm.
Classic 9mms that have good overall reputations are:
Sig P226/P228/P229/P239
Glock 17/19/26
CZ 75b
Beretta 92F
H&K USP
H&K P30
FN or Browning HP
If you want a .40S&W, get a pistol that was designed around the .40S&W. Examples would be the Sig P229, H&K USP, or S&W M&P. I'm partial to the Sig P229 myself. It is the most widely used .40S&W pistol in both large law enforcement agencies and military service because it has developed a reputation for durability, reliability, accuracy, and overall performance.