Interestingly enough, I am in the exact same position as you, considering the exact same cars. I probably won't act til early next spring though. I'm also throwing the Lexus IS-F, Audi S5, and MB C63 into the pot for consideration.
If your price range is $32-$38k though, you'll be "stuck" with the 2011 5.0 Mustang. You won't find a slightly used 2008 M3 in that range. I've been looking for a couple months and haven't found a 2008 (first year of the V8 M3) for even $45k and most are still $50k+. You'd have to drop to a 2006 M3 or potentially even a 2005 for that price range. The 2010 GT500's are mostly going for $50k+ and in my searches, its tough to even find a 2007 GT500 in your price range.
My biggest hesitation on the 5.0 is that I'll probably want to replace it again after 2 years or less (like with this mustang), and the resale value just straight up sucks on mustangs. And all other new cars for that matter. I won't hold out long enough for them to hit the preowned market either.
Assuming I can find one for a price I'm willing to pay, I'll likely go 2008 M3. In my eyes, the whole package is just leaps and bounds above the Mustang. Its got way more features, is far nicer, and stock for stock it outperforms the Stang.