Prepare the pan: Preheat the oven to 350°F. Line an 8×8-inch baking pan with parchment paper, making sure the bottom and sides are covered.
Combine the dry ingredients: In a medium mixing bowl, whisk together the flour, cornstarch, baking soda, and salt. Set aside.
Mix the butter and sugars: In a separate large bowl, whisk the melted butter with both sugars for about 30 seconds, until the mixture becomes thick and well combined.
Add the eggs and vanilla: Whisk in the eggs and vanilla extract for approximately 1 minute, until the mixture is smooth and evenly incorporated.
Make the cookie dough: Add the dry ingredients to the wet mixture. Using a silicone spatula, gently fold everything together until just a little flour remains visible.
Add the chocolate: Set aside some of the M&M's for topping. Fold the remaining M&M's and milk chocolate chips into the dough until evenly distributed.
Fill the pan: Transfer the cookie dough to the prepared baking pan. Spread it into an even layer. Scatter the reserved M&M's over the top.
Bake: Bake at 350°F until the edges are golden and set and a toothpick inserted into the center comes out with a few moist crumbs. For softer, gooier centers, bake for 35–45 minutes. For firmer bars with crispier edges, bake for up to 55 minutes.
Cool and slice: Allow the cookie bars to cool in the pan for approximately 1 hour before lifting them out using the parchment paper. Slice into squares and enjoy!