Heat oven to 350°F and line two baking sheets with parchment paper or silpats. Combine both flours, baking soda, and salt in a medium bowl. Whisk well, breaking up any lumps.
In the bowl of a stand mixer combine butter and both sugars. Mix on medium with the paddle attachment until light and fluffy, about 4-5 minutes. Add eggs, one at a time, then peanut butter and vanilla. Mix to thoroughly incorporate. Add flour mixture and mix on low until just combined. Mix in raisins. If you want the M&M's to sit pretty on top of the cookies you can push them into the cookies after you place them on the baking sheets. If you don't care you can mix them into the cookie dough now.
Scoop dough by rounded tablespoons onto the prepared baking sheets and flatten gently with your hands. Place 3 or 4 M&M's on top of each one, pushing gently to adhere. Bake for 10-12 minutes rotating trays halfway through. Let cool for 2-3 minutes on the baking sheets, then transfer to wire racks to cool.