The question itself has an inherent problem -- we don't feel the caliber or cartridge recoil. We feel the pistol recoil. You might think that's splitting hairs, but the truth is that people's impressions of how a "caliber" recoils has as much or more to do with what pistol they are most accustomed to shooting it in. For example, I HATE the internet cliche about the .40 S&W being snappy and the .45ACP being more of a slow push. With the rise of the .40S&W following pretty closely on the heels of the rise of the polymer pistol, it's a good bet that most people are familiar with the .40 through polymer pistols, the Glock 22, in particular. That's a 23oz pistol. Given that the 1911 is the best sold pistol in history, and most 1911 pistols are made in .45ACP, it's safe to assume that the collective shooting public's impression of how a .45ACP recoils comes primarily from experience with the 1911. That's a 39oz pistol, more than 50% heavier than a full-size Glock. Recoil is recoil energy, and pistol mass mitigates recoil energy. Heavier pistols recoil less given similar muzzle energy.
So the .40 is snappy while the .45 feels more like a slow push? Really?
A .40S&W pistol load that produces about 400 foot-pounds of energy through a 23oz polymer pistol feels snappier than this .45 ACP load that produces about 400 foot-pounds of energy through a 39oz all-steel pistol? You think??
I know the OP asked about 9 vs .40 in the same pistol. But the above illustrates that calibers don't recoil a certain way. In the case of 9mm minor power factor, in the same basic pistol, a light 9mm bullet will recoil more than a heavy .40 bullet at the same power factor. Change the application, and change load preferences, and the .40 recoils more. There's so much more to the question than caliber.
A good question on this subject might be whether or not you are likely to run into a recoil issue with .40S&W that would hinder your shooting ability. To that, I would refer you to USPSA Limited, where people are shooting .40 at major power factor, and they're shooting it fast. I don't expect people to shoot with the recoil management of the top shooters -- I certainly can't -- but when you look at some of these guys shooting .40 at major power factor, you have to wonder -- what was I worried about? If you need an example, check this guy out. Is there anything in this video that would make someone think .40 recoil is a significant problem?
edited to fix embarrassing word choice error