Oh, something I actually know a little about! :D My most recent car change was to sell my 951 and buy an E46 M3. I'm a BMW guy at heart you see... The E46 M3 is in my opinion the best dual-purpose car ever. It's totally happy to tool around town at low revs and rides comfortably doing it. Then when the road opens up wind that straight six out to the 8k limiter and watch the scenery turn into a blur very quickly. When the road turns this car does so very well too. Unlike the E36 the interiors generally hold up well. It's heavier than the E36 but much stiffer. My car has every option except the power rear sunshade. Navigation, bluetooth, aftermarket iPod integration, power adjustable seats including side bolsters, etc. It's a nice place to spend time.
There are two big scary problems - rear subframes and VANOS failures. The rear subframe mount points on the body can tear. A class action lawsuit led to a settlement where BMW inspected the cars and if cracks were found repaired them. Turner sells a weld in reinforcement kit that fixes the problem permanently, but requires dropping the rear subframe to do it, not a small task.
VANOS is BMWs variable cam timing system, run off high pressure oil. The M3 has a separate high pressure oil pump to run the VANOS. There are two issues - the bolts holding the intake cam to the system can back out slightly and then break and the tabs on the exhaust cam sprocket that engage the VANOS system can break. Neither one will kill the car but a replacement VANOS isn't cheap. There's no real way to change the VANOS bolts for the updated version without special tIming tools. Also, the VANOS oil seals can fail and leak - there are upgraded replacements available.
The S-series motors in the M cars are more maintenance intensive than their lesser counterparts in that they have solid lifters and require them to be adjusted every 30k miles or so.
Suspension bushings are 50k or so wear items and if neglected can lead to severe tire wear and lousy handling (yeah, duh). Rear trailing arm bushings are often upgraded to poly. Front control arm bushings are also often poly upgrades. I was pleased to find both under my car yesterday.
I highly recommend a test drive to see if the E46 M3 is for you. The last year of the E46 M3 was 2006. Good condition relatively low mile examples are high 20s to mid 30s. My 97k mile 2002 with a replacement motor at 27k miles and a new set of rod bearings after that was 16k at a local dealer. Pricing can vary regionally quite a bit.
Keith will have to comment on the M5.