Cook and shell the chestnuts, and chop into pieces.
Peel and core then finely chop the apples, about 1 centimeter cubes is fine.
Mix the apple, chestnuts, pork, Madeira, and one egg in a large mixing bowl. Season well with salt and pepper.
Butter the flan tin generously, including the top lip.
Roll out two-thirds of the pastry to about ¼ inch/.65 centimeter, and line the flan tin with it. Allow the top edges to overlap the sides of the tin.
Prick the base with a fork then spread the filling over the base.
Roll out the remaining pastry and place over the tin, sealing the edges. Decorate with pastry shapes, if you wish, and brush with beaten egg. (Do not trim the edges at this stage, the pastry will shrink during cooking. You can trim it once it is cooked and cooled.)
Cut a small hole in the middle to allow the steam to escape.
Bake for 45 minutes, and then cool for 10 minutes and serve warm.
Notes
* Use one of the methods below to cook the chestnuts.1. Oven Roasted
The easiest method is to roast them in the oven at 425°F/220°C/Gas 7 on a baking tray.
Simply slit them into the fleshy inside or twice making an X on top. This will make them easy to peel as the corners will lift while roasting, Either way, works.
Pop them on the tray for about 20 minutes in the oven and then you can peel and chop them when they cool down.
2. Boiled
Chestnuts can also be boiled; this is a good method if you want a chestnut purée for a recipe.
To cook in this manner, simply wash the chestnuts under running water.
Then cut each chestnut in half.
Pop them in a pan of water.
Bring to boil and simmer for about 5 to 10 minutes.
When cool remove the shells and chop.
You can buy chestnut puree in cans/tins from good supermarkets or specialty food stores, but I like the chopped nuts better, your choice.