Place the raspberries into a small saucepan along with 4 tablespoons of sugar, 1 teaspoon of vanilla extract, 1 tablespoon of cornstarch, and 2 tablespoons of water. Cook for 5 to 10 minutes until the raspberries are broken down and jammy. Remove from the heat and set aside for 20 minutes until cooled.
You can put the raspberry jam through a sieve to remove the seeds if you prefer seedless jam, though it isn't necessary.
Preheat the oven to 350 F and prepare an 8x8 inch baking tin by lining it with parchment paper.
Beat together the butter and ⅔ cup sugar in a stand mixer for a few minutes until it is pale and fluffy.
Add the egg and the vanilla extract and then beat for another 30 seconds until they are well combined.
In a separate bowl, add the plain flour, oats, ground cinnamon, and salt. Mix well.
Stir the dry ingredients into the butter, sugar, and egg mixture until just combined.
Divide the oat batter in half; place half of it into the prepared baking tin, smoothing it out using a knife or the back of a spoon.
Add the cooled raspberry jam to the baking tin on top of the oat base, and then crumble the remaining oat batter on top of the raspberry mixture.
Bake for 30 minutes until the top is golden and a knife placed into the batter comes out clean. Allow to cool completely before slicing and serving.