If bought in sealed bags, the shelf life should be as printed on the packet as long as they stay unopened (really good pellets would be nitrogen-packaged or vacuum-sealed, but this is expensive). The amount of oxygen in a bag, even if packaged in air should not be enough to cause serious oxidisation within a reasonable timeframe. If they are purchased by weight from storage bins (as happens in my local retailer), it's really a case of hoping that they have enough turnover so that the lipids in the pellets never get the chance to go rancid before being used.
There is a huge range of pellets available for aquaculture, halibut, trout and carp pellets are just a few from many, the composition will determine how quickly they deteriorate under given conditions (fish and crustacean oils become rancid particularly quickly). There are some really potent feeds produced for shrimp farming, but I wouldn't suggest people trying them in our low temperatures on omnivorous Cyprinids.
In moderation most things are fine, but it might be interesting for a lab to do a necropsy on fish from some of the rivers that get really hammered with pellets. The trouble is that if a fish is more than a couple of hours dead there's not much use sending it off, and by the time most dead fish are found they are well beyond that (plus of course the costs involved).