Whisk the flour, baking soda, cornstarch, and salt together in a large bowl. Set aside.
In a medium bowl, whisk the melted butter, brown sugar, and granulated sugar together until no brown sugar lumps remain. Whisk in the egg, then the egg yolk. Finally, whisk in the vanilla extract. Pour the wet ingredients into the dry ingredients and mix together with a large spoon or rubber spatula. Fold in the chocolate chips and M&M's. Cover the dough and chill in the refrigerator for 3 hours. Do NOT skip chilling or your cookies will spread too much. The longer the better.
Remove the dough out of the refrigerator and allow to slightly soften at room temperature for 10 minutes.
Preheat oven to 325°F. Line two large baking sheets with parchment paper. Set aside.
Roll the dough into balls, about 3 tablespoons of dough each. Place 8 balls of dough onto each cookie sheet. Press a few more M&M's on top of the dough balls. Bake the cookies for 11-12 minutes. The cookies will look very soft and underbaked. They will continue to bake on the cookie sheet. Allow to cool on the cookie sheet for 10 minutes before transferring to a wire rack to cool completely.
Beat the cream cheese, butter and peppermint extract together until soft and fluffy. Add the powdered sugar little bit at a time and keep mixing until smooth. The filling should be of spreadable consistency. Stick it in the fridge for 20 minutes.
Add a dollop of the chilled filling on one cookie and press it down with another one. Roll the edges of the sandwich cookies in the crushed candy canes so that the crushed pieces stick to the filling.