It's a tough question. I don't think I've ever run a module or adventure path, but this applies to "normal" campaigns too I think. The GM still decides what monster lives in that cave, and what trap guards its treasure. Even if you run a sandbox campaign, you'll improvise most of it, but you're still deciding on what the party faces. It's more subtle, but do you just conveniently skip over the shadow statblock because none of your PCs can hit intangible creatures? Do the ice elementals conveniently appear around the time the wizard first learns fireball?
Naively, the game is more fun when everyone gets to do their thing. If someone takes a feat/class/item that makes them immune to fear, they're going to be at least a little disappointed when nothing causes fear for the rest of the campaign. At the same time though, if the game world perfectly adapts to the party to make sure they're always prepared for everything they encounter, then character creation becomes trivialized, or even meaningless. What's the point of picking one ability over another if the world will conspire to make them equal in all aspects?
One specific issue I struggle with is PC abilities whose purpose is just to counter specific enemy abilities. Things like darkvision, Remove Curse, Bravery, etc. If your decision of whether or not to include an enemy with a curse attack entirely depends on whether or not the party can remove it, then you're incentivizing your players to avoid remove curse, because that's just one less thing to worry about. There's a temptation to think "Hmm, curses sure are annoying. We'd better be sure no one can remove them so that the GM can't throw them at us."
I don't have a good answer, and in most of my games I just end up taking some middle ground. If the party is missing something important, like the ability to hit flying foes, I'll try to throw a very easy encounter with a flying enemy. Something easy enough that it won't TPK, but will it will make everyone scramble to buy bows in the next town. If a PC has an ability that never sees use, I'll usually pull the strings so an encounter that lets them use it happens at least once in the campaign. Usually, but not always. PCs get a lot of abilities, and some of them can be very narrow.