Preheat your oven to 350°F (175°C). Line a 9×13-inch baking pan with parchment paper, leaving overhang on the long sides to lift the bars out later. Lightly coat the parchment and pan sides with cooking spray or a thin layer of butter.
In a large bowl, whisk together the flour, rolled oats, 1 cup (200 g) granulated sugar, light brown sugar, baking powder, 1/2 teaspoon salt, and cinnamon (if using). Break up any clumps of brown sugar with your fingers. This mixture will serve as both the base crust and crumb topping.
3 cups all-purpose flour, 1 cup old-fashioned rolled oats, 1 cup granulated sugar, 1/2 cup light brown sugar, 1 teaspoon baking powder, 1/2 teaspoon fine sea salt, 1 teaspoon ground cinnamon
Pour the melted butter, beaten egg, and 1 1/2 teaspoons vanilla extract over the dry mixture. Stir with a sturdy spoon or spatula until everything is evenly moistened. The mixture should look like coarse, sandy crumbs that clump slightly when pressed in your hand.
1 cup unsalted butter, 1 large egg, 1 1/2 teaspoons vanilla extract
Transfer about two-thirds of the crumb mixture to the prepared pan. Use your hands or the bottom of a measuring cup to press it into a firm, even layer, making sure to press well into the corners. This forms the buttery shortbread-like base that will help the bars hold together when sliced.
In another bowl, combine the blueberries, 1/2 cup (100 g) granulated sugar, lemon juice, lemon zest, cornstarch, 1 teaspoon vanilla extract, and a pinch of salt. Gently toss until the berries are evenly coated and no dry cornstarch remains. If using frozen berries, work quickly so they don’t release too much juice before baking.
4 cups blueberries, 1/2 cup granulated sugar, 2 tablespoons lemon juice, 2 teaspoons lemon zest, 3 tablespoons cornstarch, 1 teaspoon vanilla extract, salt
Spoon the blueberry filling evenly over the pressed crust, spreading the berries and their juices right into the corners so every bar has a jammy center.
Sprinkle the remaining crumb mixture evenly over the blueberries. Leave some larger clumps and some smaller bits for varied texture. Gently pat the crumbs so they adhere, but do not press them firmly like the base.
Bake on the center rack for 40–50 minutes, or until the top is light golden brown and the blueberry filling is bubbling around the edges. If your oven runs hot, start checking around 38–40 minutes.
Transfer the pan to a cooling rack and let the bars cool completely, at least 2 hours. The blueberry layer will continue to thicken as it cools. For the cleanest slices, chill the pan in the refrigerator for 1–2 hours after it reaches room temperature.
Use the parchment overhang to lift the slab of blueberry crumb bars onto a cutting board. Slice into about 16 large or up to 24 smaller bars. Serve at room temperature, or slightly warm with a scoop of vanilla ice cream if desired.