Preheat your oven to 350°F (175°C). Line a 9x13 inch baking pan with parchment paper, leaving some overhang to make it easier to lift the bars out later.
In a large mixing bowl, whisk together the all-purpose flour, old-fashioned oats, baking soda, and sea salt. Set this mixture aside.
In another large bowl, beat the unsalted butter, creamy peanut butter, light brown sugar, and granulated sugar together using an electric mixer until the mixture is light and fluffy—about 2-3 minutes.
Add the eggs one at a time, mixing well after each addition. Then, stir in the vanilla extract until everything is well combined.
Gradually add the dry ingredient mixture to the wet ingredients, mixing until just combined. Be careful not to overmix.
Using a rubber spatula, gently fold in the semi-sweet chocolate chips and 1 cup of the M&Ms. Reserve the remaining 1/2 cup of M&Ms for topping.
Spread the cookie dough evenly into the prepared baking pan. Use the spatula to smooth the top.
Sprinkle the reserved M&Ms over the top of the dough, pressing them down slightly. Finish with a light sprinkle of flaky sea salt.
Bake in the preheated oven for 25-30 minutes, or until the edges are golden brown and a toothpick inserted in the center comes out with a few moist crumbs.
Allow the bars to cool in the pan for about 15 minutes. Then, use the parchment paper to lift the bars out of the pan and onto a wire rack to cool completely before cutting into squares.