To determine fertility/infertility would require more disturbance than is usually acceptable. Years ago (and probably some still do) some projects used to candle eggs, but most don't/didn't - happy to just have eggs.
Most eggs don't last long - some birds discard eggs from nestbox, some keep them around and keep incubating them, some roll them to the back of the box. But the same as the point above, retrieving them means disturbing the birds, which technically is prohibited by law. Now some projects do try to retrieve eggs if there are problems with a pair or something similar, a special case. Most don't.
Some will eat, some will transport away from the nest, some will just leave them. Different birds, different pairs, different responses. Trey and Princess have always removed infertile eggs. Looks like a number of their offspring do the same thing - the Brandon pair removed two of their four eggs this year, could have been damaged but Hurricane is experienced so entirely possible they were non-viable and removed.
Contaminants don't always turn up in the eggshells - DDT and DDE and related contaminants do. Flame retardents don't it appears. Others will be other places. Do we test? No. There is academic research though, the flame retardant stuff is the newest contaminant being looked at - not an eggshell problem so far, but there are some questions as to whether or not they cause behavioural changes. And DDT and DDE was not related to fertility/viability, it caused eggshell thinning which was responsible for embryo/chick mortality.