Set oven to 350°F (175°C). Apply non-stick baking spray to the bottom of an 8x8-inch baking pan, then line it with parchment paper, leaving an overhang of 1 to 2 inches on the sides for simple lifting.
In a heat-safe bowl set over a double boiler, combine the butter, chocolate, and sugars, and melt them. To make the double boiler, put 2 inches of water in a medium saucepan and place over medium-low heat. Set the heat-safe bowl on the saucepan, making sure its base doesn't touch the water. Heat, stirring often, until everything is melted. The mixture will look grainy yet glossy. Take the bowl off the heat and let it cool a bit.
Incorporate the eggs one by one, whisking thoroughly after each. Keep whisking until the mixture becomes lighter in color and is smooth and shiny.
Mix in the cocoa powder, salt, and vanilla. Stir until well combined.
Add the flour, using a large spatula to fold it in until only a few streaks of flour are left. Avoid overmixing.
Pour the batter into the prepared pan and smooth the top with an offset spatula.
Scatter the M&M’s over the brownie batter.
Bake for 45 to 50 minutes, or until the edges are set and a toothpick inserted 2 inches from the pan's side comes out with just a few crumbs. Do not overbake, or the brownies will be cake-like and dry instead of fudgy.
Take the pan out of the oven and place it on a wire rack to cool. Let cool completely before cutting into squares.