Heat 1 tbsp of olive oil in a large pan. Season the beef and brown in batches. Set aside. Add extra oil and brown the chorizo. Set aside with beef.
Add the onions, cook for a few minutes, then add the garlic and chilli and cook for a minute. Return the meat to the pan and pour in the red wine. Simmer for a minute then add the stock, thyme, bay leaf and tin of tomatoes. Bring to the boil, then reduce the heat, cover and simmer for an hour.
Add the butternut squash and cook for a further 30 minutes. Take off the heat and fish out the bay leaf and thyme sprigs. Let cool for 10 minutes.
Remove any fat from the surface, return to the heat and bring to a gentle boil. In a small pan, melt the butter and stir in the flour to make a roux. Stir into the main dish until the sauce thickens, then pour the filling into a pie dish. Let cool.
Preheat the oven to gas 5, 190˚C, fan 170˚C. Roll out the pastry on a floured surface, so that it's slightly larger than the pie dish. Brush the rim with water and top with the pastry lid. Press down to seal. Brush with beaten egg and cut a steam vent in the top.
Place on a baking tray and cook for about 40 minutes, until puffed and golden.
See more beef recipes
For top tips on protecting you and your family when preparing raw meat and poultry, visit Food Safety in the Home and view the full Food safety at home video.