Heat the milk and the vanilla extract in a pan, and bring it to a boil.
Mix the cornflour with sugar in a separate bowl.
Beat the eggs separately and then add to the cornflour mixture.
Reduce the heat of the stove and add the cornflour mixture to the boiling milk and mix everything well.
Cook the mixture on the stove at a low temperature for 1-2 minutes.
Start preheating the oven at 200C (400F)
Unroll the pastry pie crust on a rectangular or round dish.
Roll out the pie crust in the baking dish and add the cornflour and milk mixture on top.
Cook in the oven at 200C (400F) for around 40 minutes until the top look firm and lightly browned.
Remove from oven and let it cool on a countertop for at least 15-20 minutes so that it can harden.
Add the berries into a saucepan and heat at low temperature for 5-7 minutes until slightly runny.
Use the berry compote to top the flan and let it rest for at least 10 minutes.
Serve at room temperature or from the fridge.