It's true that a shotgun is situational by its very nature, but the game's design can go a long way in how viable a shotgun is.I never actually thought of the shotgun as a good weapon per se. What I mean is I'm with Yahtzee that shotguns are situational weapons that really doesn't do much for most shooters. Even Doom the plasma rifle, assault rifle and rocket launcher are used more often, and for close range you have a chainsaw and punching.
Shotguns have always been the gun I save for when all other ammo is gone, including the pistol, because of just how limiting it is.
I haven't played Eternal yet, but I found plenty of use for the standard shotgun in 2016 - at least earlier on anyway. The game has plenty of close quarters encounters and enemies and many times I don't really wanna use up the ammo for other guns on imps. I really liked the explosive shot upgrade too. Yes it does get phased out by other guns later on, but I think that's just the nature of the more classic style of shooter. Not all the guns are balanced equally. For the first gun you get, I thought I used it a decent amount and I'd still swap back to it later on to deal with imps and possessed.
FEAR takes place mostly in cramped office complexes, so the shotgun remains a strong choice throughout the game.
Halo basically creates shotgun situations with the Flood. With varying efficacy depending on the game though. The shotgun felt a bit useless in Halo 2. You could one shot the flood combat forms using precision weapons to target the infection forms. Shielded flood and one shot kill melees also made close quarters not desirable against them. 2 was whacky and really badly tuned in many respects. The shotgun remains the prime anti-flood mainstay in CE.
On the topic of Flood, I think all games with zombies or similar melee type enemies end up with much more of a role for the shotgun than games with more conventional enemy types.
In games like CoD though, I find the shotgun a bit of a hard sell. I'm typically picking it up just for the jollies than for practical reasons.
I remember the shotgun being quite decent in Max Payne. Not sure if a bug or feature, but slo mo seemed to really restrict the spread. It'd disperse to a certain degree as the shot left the gun, but more or less flew straight after that so it had very decent effective range.