I'm not biased: I've had both, unfortunately.
The debate of the 870-verse-500 is very tough. Head to head comparison is difficult since many different models are made of each shotgun. Further complications involve pesky Internet rumors.
We'll first dispel the myths. Military chose the Mossberg. Law enforcement chose the 870 (the same folks who use Glocks almost exclusively). Both guns have been made with plastic trigger groups as well as aluminum. Mossberg triggers and safety don't break (anymore). Both guns are generally reliable and durable.
The 500 can be completely stripped and serviced with basic hand tools. The extractor and mag tube on the 870 requires major work to replace. The rat-trap elevator of the 870 is a nightmare to deal with. Mossbergs skeleton elevator is genius.
The Mossberg is a modular design. Any Mossberg receiver can accept 6, 8 or 9 shot one-piece magazine tubes. The 870 can only accept a scew-on magazine extension which has inherent faults. The Remington will always hold one less round than the Mossberg since the Remington only has a 5-shot tube.
The 500 tang-mounted safety is in a superior location. And if you just have to have a cross-bolt trigger safety get a Maverick 88.
These guns are opposites in terms of build quality. Simply put, Mossberg got better while Remington got worse. The old 870 Wingmasters were works of art. They showed the world what a solid American gun was. Unfortunately these guns were 2 3/4 chamber only and the early elevator design was a jam-o-matic. These issues have been fixed on the newer 870s, but we're also seeing flaky finishes and horrible machining. It really is a lose-lose situation with Remington.
The aluminum receiver of the Mossberg gets a lot of grief; in reality the Mossberg is lightweight, corrosion proof and durable. The Mossberg forend has always rattled while the 870 has a very solid design. The rock-solid forend of the 870, along with its dense steel receiver, gives the action a smooth feel and a nice ringing sound. The Mossberg goes thud thanks to its lightweight aluminum receiver. It is my opinion that many people choose the Remington strictly because it "feels" and "sounds" better even if though the design has major flaws.
The Mossberg is clearly the better shotgun. Unless you want to talk about Benelli