In general, MB reliability collapsed around this time, and got worse with Chysler's merger. What happened was a couple of things. First, MB rushed a ton of electronic heavy technology to market before it was quite ready. Second, MB squeezed its suppliers who in turn supplied inferior parts, as MB tried to keep pace with Lexus. These two factors led to an absolute crash in quality around this time.
Mercedes has righted the ship today, but several models around this time were very poorly built, and the M-Class built in Alabama is near the bottom of the barrel. On the plus side, you probably benefitted from an extremely low purchase price on the used car market -- ML55s have some of the worst resale values in the automotive world.
Transmission problems and window problems (probably the regulators) are very common MB issues. As to whether your particular car is a lemon, you would need to research its history, which you can do by having your dealer pull its service records from MBs computer database. That way you can tell how many times the car has been serviced and for what issues.
That being said, keep in mind this car is now 7 years old. That is pretty old in car years for any vehicle, so you should expect to have some problems from any German automaker after that many years. Merceds engines are bulletproof, so they will run forever. However, electronics issues are another story, and I would expect them to occur with this car and count yourself lucky if they don't.
As to what you should do, I'd pull the service history first. If you have a car with a poor history, consider selling. Also, I would certainly look into aftermarket warranties. They will pay for themselves with one big issue. Check with your dealer for which product they recommend.
Then it just is a matter of how much you like the car and what you are willing to put up with. AMG cars are special, and one can forgive a lot of ills for the pleasure of driving them.