Hey amolkapoor~nobody has asked you what you plan to do with the shotgun you end-up with...so I will!

Sounds as though you're just getting started, and, the guns/loads you've exposed yourself too are both pretty heavy. Buckshot is a heavy hitter with very few hunting applications in Canada, so keep that in mind. Punishing yourself with buckshot if you plan on only shooting clays (trap/skeet/sporting clays, etc.) isn't necessary.
If by "Target" you're referring to "Target Sports", chances are (being an indoor range) they only let you shoot that...or slugs so that you're not peppering other shooter's targets. As a new shooter, you may have come to the conclusion that all 12ga. guns kick like a mule if that's all you've ever tried. Not the case at all. The 870 is a heavy gun and with proper hold, actually reduces felt recoil over a much lighter gun, so that's one thing to consider. I've seen new shooters with a less-than-ideal hold look shocked by the recoil...then..hold the gun slightly away from their shoulder on the next shot (understandable)...not realizing that makes recoil feel 10x worse. If you're an adult-sized shooter, holding a 12ga. pump properly, recoil with slugs or buckshot is substantial...but shouldn't be punishing. Remember too~they're not "target" loads either. Nobody (I know) sits for an afternoon shooting slugs or buckshot. It's kind of purpose-made stuff...and that purpose is rarely targets. At least, not allot of targets.
20ga vs. 12ga~2 main factors (outside of proper hold) governing recoil is the weight of the projectile(s), and the gun's weight. Heavy load/light gun=higher recoil. Heavy gun/light load=lower recoil. That same 12ga. 870 shooting #8 target loads~I bet you could do that all day.
Lastly...to try and answer the question you asked at face value~semi auto (auto-loading) shotguns tend to feel a little lighter in the recoil dept. Some more than others. I own a few 870s, but got a chance to shoot a Remington Versamax Tactical last summer. Semi auto, heavy gun, but the softest-shooting 12ga. I've ever shot.