Preheat the oven to 350°F (176°C). Line an 8"x8" (20cm x 20cm) baking pan with aluminum foil, then spray the foil with cooking spray and set aside.
In a large microwave-safe bowl, melt the butter in the microwave.
Allow the butter to sit for 1 minute before whisking in the egg. Then, whisk in the brown sugar and vanilla until smooth.
Add the flour and stir until just combined; be careful not to overmix.
Pour one-third of the batter into the prepared pan.
Layer the Oreos, then pour the remaining batter evenly over the cookies. Use a spatula to spread the batter, if needed. Evenly sprinkle the M&Ms on top and lightly press them down with your finger.
Bake for approximately 20 to 22 minutes. The top should be set and the edges slightly firm. A toothpick inserted in the center should come out with a few moist crumbs but no batter. Allow the bars to cool in the pan for at least 30 minutes before slicing and serving.