Prep the pan: Heat the oven to 350°F (175°C).
Line a 9x9-inch baking pan with parchment, leaving overhang for easy lifting. Lightly grease the parchment.
Mix the dry base: In a large bowl, whisk flour, oats, granulated sugar, brown sugar, baking powder, and salt until combined.
Cut in the butter: Add cold, cubed butter. Use a pastry cutter or your fingertips to work it in until the mixture looks like coarse crumbs and holds when pressed.
Stir in vanilla.
Form the crust: Press about 2/3 of the crumb mixture firmly into the bottom of the pan. Use the bottom of a measuring cup to compact it well.
Make the raspberry layer: In a medium bowl, gently toss raspberries with cornstarch, lemon zest, and lemon juice. If using frozen berries, don’t thaw; just toss and use immediately.
Assemble: Spread the raspberry mixture evenly over the crust.
Sprinkle the remaining crumb mixture over the top, leaving some raspberries peeking through.
Bake: Bake for 35–45 minutes, until the top is golden and you see jammy bubbles around the edges. Frozen raspberries may need a few extra minutes.
Cool completely: Let the pan cool on a rack until room temperature. Then chill for 30–60 minutes for the cleanest slices.
Slice and serve: Lift out using the parchment.
Cut into 12–16 bars. Serve as is or with a dusting of powdered sugar.