Depends on what you want to accomplish: fun vs knowledge. M School is a lot of fun and you can flog the entire fleet of M cars. Obviously you're paying a lot more for this and it gives many the piece of mind of not worrying about destroying anything.
However, you will learn a lot more in an HPDE since it's in your own car where you test the limits. Specifically, you'll get an instructor in your passenger seat that will teach you proper driving techniques with instantaneous feedback. Instructors are very well qualified and go through several years of training to teach. I haven't done a 2 day M School (but have done several 1 dayers) but the instructors are usually leading your group and comunicating via 2-way radio. While you get some instruction on what line to take, when/how to brake/accelerate. etc, it's not personalized to exactly what you're doing.
Another option would be to do both. Our CCA chapter does a 1 day M school twice a year for a lot less than the published rate at the Performance Center (less than $700). We caravan down Friday morning, tour the Zentrum and factory, drive M cars all day Saturday, and head home on Sunday. Check the website because registration already opened, but this plus 1 HPDE is a LOT less than $3k.