Prep the pan: Heat oven to 350°F (175°C). Line an 8-inch square pan with parchment, leaving overhang for lifting.
Mix the dry ingredients: In a large bowl, whisk flour, oats, brown sugar, baking powder, and salt to break up any lumps.
Add butter and vanilla: Pour in the melted butter and vanilla.
Stir until the mixture forms moist clumps and no dry patches remain.
Form the base: Press about 2/3 of the mixture firmly into the pan. Pack it well so the base holds together.
Par-bake: Bake the base for 12–14 minutes until just set and lightly golden at the edges.
Make the raspberry layer: In a small bowl, mix jam, mashed raspberries, lemon juice, and cornstarch if using.
Melt the chocolate: In a microwave-safe bowl, heat chopped dark chocolate and oil in 20–30 second bursts, stirring until smooth.
Layer it up: Spread the raspberry mixture over the warm crust. Drizzle or dollop the melted chocolate over the raspberries.
Add the crumble: Scatter the remaining oat mixture evenly on top, leaving some gaps so the berry-chocolate peeks through.
Bake: Return to the oven for 22–26 minutes, until the top is golden and the berry layer is bubbling at the edges.
Cool and set: Let the pan cool on a rack for at least 1 hour.
For clean slices, chill 30–60 minutes before cutting.
Slice and serve: Lift out with parchment and cut into 12–16 bars. Serve at room temperature.