Knead the flour, egg, oil, salt, and water into a smooth dough, cover, and let sit for 15 minutes. Roll out the dough on a floured surface and use a glass to cut out circles.
Caramelize the brown sugar in a pan over medium heat, stir in the raspberries, and add the lemon juice. Gently stir the filling until everything is mixed and then let it cool down.
Spoon a small portion of the raspberry filling into the center of each dough circle.
Fold the dough circles over and seal the edges.
Fill a large pot with water, add 1 tsp of salt and 1 tsp of sugar, and bring it to a boil. Gradually add the raspberry pierogies and cook for 3 to 5 minutes – they'll rise to the surface when done.
For the vanilla sauce, add the sugar, vanilla bean, and a little more than half of the milk to a saucepan. Mix the rest of the milk and the corn starch together in a separate bowl and then add it to the saucepan. Stir in the egg yolks and salt and bring to a boil while stirring. Let the sauce simmer for 30 seconds before removing from the heat.
Remove the vanilla bean from the saucepan and pour the vanilla sauce over the raspberry pierogies.