Preheat oven to 375 degrees.
In a bowl, combine blueberries, sugar, cornstarch, and vanilla.
Mix together and set aside.
To make the almond paste custard, add almond flour, almond extract, vanilla extract, butter, egg, and sugar to a bowl.
Stir everything together until it forms a paste. Set aside.
Roll out the pie dough to roughly 11-inches wide.
Add the almond paste to the pie dough leaving a 2-inch wide border.
Add the blueberries to the top of the almond paste.
Gently, fold the edges of the pie dough up and over the blueberries. Pressing gently to seal.
Make an egg wash combining one egg with a splash of water. Brush the egg wash around the edges of the pie dough.
Sprinkle a few almond on top, pressing gently so they stick to the egg wash.
Place in the oven to bake for about 45 minutes to 1 hour.
Let cool slightly and serve!