I was in the same boat not too long ago. I lease my cars though, and the thing that got to me is that my payments on a BMW that costs nearly 10K more than the mercedes were lower. The BMW resale value is much higher, and that is what accounted for the difference.
I bought a BMW 530 over a Mercedes. The 320 was greatly underpowered IMO, so I was looking at an E500 if I went the Merc route. I had a C320 previously, and I really wanted the E500 but I couldn't make it make sense.
Overall, I'm very happy with my 5 series. I would suggest the 530 over the 525 because of the power. I don't know the horsepower/mileage figures. I own a 911 and a Navigator as well, and before that a Mustang, and an XJ8 so I obviously have a problem with underpowered cars

.
Reliability-wise, no problems so far... but the car has been in the shop several times (04 530i):
1) It auto-Locked my daughter in the car. Glitch in the electrical/idrive system. Fire department had to knock out a window. (long story). After 2 weeks, the dealer had lost the paper work and hadn't ordered the window. Then they apparently could have the window the next day. (even though when I first informed them, it was 3 weeks out at the earliest). The window replacement took 1 1/2 weeks.
2) Stress crack in the windshield. Started as a tiny crack, but then it got huge. Dealer confirmed this was a factory defect issue. 3 weeks to order a windshield. 1 week for first installation which whistled. 2 weeks to schedule the next one. After 1 week in the shop, they called because they couldn't hear the whistle. I drove it with their guy in the car to confirm the whistle. Their service manager told me they would replace it again, and I went home. 2 weeks later, I call in because I haven't gotten a call back. They FORGOT they had the car! 1 week later, I get the car back.
3) At < 7,000 miles, the car is asking me for more oil. I went in to add a quart, and like the idiot I am, I put it in the power steering tank. (labeled ATF Oil only, but the ATF was partially covered in grease and I just wasn't paying enough attention) 1 day in the shop at the third dealer who was very efficient, but I paid for the car and asked them to bring it out front and went on a test drive. Came back an hour later and the car was still not pulled out front and I ended up waiting 30 minutes more. The biggest problem I have with this experience is that the car needs oil at less than 7000 miles. My Porsche asking for oil is one thing... but a new BMW? hmm...