Start by preheating your oven to 350°F. Line your 9-inch square pan with parchment paper, leaving some overhang on the sides so you can lift the bars out easily later. This little step saves a lot of hassle when it's time to slice.
In a medium bowl, whisk together the flour, baking powder, baking soda, cornstarch, and salt. Whisking first makes sure the leaveners are distributed evenly, so you don't end up with bars that rise unevenly or taste bitter in spots.
In a separate large bowl, beat the softened butter and sugar together until the mixture turns pale and fluffy, about 3 minutes. This step builds air into the dough, which is part of what keeps these bars from turning dense.
Beat in the egg, egg yolk, vanilla, and almond extract if you're using it. Scrape down the bowl as you go so everything blends evenly. The mixture should look smooth, glossy, and slightly thickened at this point.
Add the dry ingredients into the wet mixture and beat on low speed until just combined, then bump up to medium-high for a few seconds. The dough will be noticeably thick and sticky that's exactly what you want here.
Gently mix in the rainbow sprinkles until they're evenly scattered through the dough. I like to save a few extra sprinkles to press on top before baking for a prettier finish.
Since the dough is sticky, lightly flour your hands or use a spatula to press it evenly into the prepared pan. It will look like a thin layer, but it puffs up nicely in the oven.
Bake for about 25 minutes, until the edges turn lightly golden but the center still looks a touch underdone. That soft center is the key to a chewy bar instead of a dry one, so resist the urge to leave it in longer.
Let the bars cool fully in the pan on a wire rack. The middle will sink slightly as it cools, which is completely normal and actually helps create that soft, brownie-like texture.
While the bars cool, beat the butter until creamy, then add the confectioners' sugar, cream, and vanilla. Beat on low first, then medium-high for a few minutes until light and fluffy. Add a pinch of salt if it tastes too sweet.
Lift the cooled bars out using the parchment overhang, spread on a generous layer of frosting, and top with extra sprinkles. Use a sharp knife, wiping it clean between cuts, for neat, bakery-style squares.