There is a wide spectrum of loads for both 12 and 30-06. Even in equal weight guns there is overlap. Some 30-06 loads will recoil more, some 12 ga loads will recoil. If you are shooting common 2 3/4" field loads in a 12 the shotgun will be more comfortable to shoot. #1 actual recoil is a little less. #2, the velocity of the recoil has to be considered. The difference is just a tiny fraction of a second, but since a shotgun is recoiling slower, the effects of the recoil are spread out over a longer time period.
The actual calculated recoil could be exactly the same, but if the recoil is spread out over more time, most people find it more comfortable. This is why gas operated semi-autos are much more comfortable to shoot. The recoil is spread out over even more time.
Once you get into 3" shells, especially heavy turkey loads or any buckshot or slug load then a shotgun will have considerably more recoil. The 3 1/2" shells often exceed 458 WM recoil.
Just for reference, Typical recoil from 7 1/2 lb guns
30-06--------------------------------- 18-22 ft lbs depending on the load
12 field loads------------------------15-18 ft lbs
12 slug, buckshot, or magnum--28-30 ft lbs
300 WM-------------------------------28-32 ft lbs
12 3 1/2" loads----------------------72 ft lbs
458 WM ------------------------------68 ft lbs
The 458 load is from a 9 lb rifle, they don't make 7 1/2 lb 458's. Actually a 9 lb 458 would be on the light side.