We own both a 2005 325xi and a 2004 E320 4-matic. Both cars are excellent, and have various advantages and disadvantages. Of course, it is not fair comparing them since the 3 series and E class are totally different classes of cars, but I will compare anyway. The BMW is far sportier, and a lot more fun to drive. It's not fast, but it handles beautifally and has perfect steering and brakes. The Mercedes is far more comfortable, bigger, and more luxurious. It handles worse, and the brakes and steering isolate the driver from the road more than a BMW, but less than a Lexus. Both cars have had flawless reliability, but the Mercedes dealer has better service than the BMW. Most importantly to me is that they both feel like they are worth the cost.
I much prefer the 3 series BMW to the C class Mercedes. I think that the E class vs. 5 series is a draw (the 5 series is just so ugly), and the new S class blows the 7 series away. In terms of power and acceleration, an AMG will typically smoke an M car, but on a track or curvy road the M will dominate the AMG. There are certainly pros and cons to each car, and every buyer must decide for themselves what they want from the car.