Heat the oil over a medium high heat in a frying pan. Add the onion and fry for 5 minutes until softened. Add the squash and herbs and cook for another 5-10 minutes.
Put the mixture in a bowl and add the ricotta, goat's cheese and plenty of salt and pepper. Mix well and set aside to cool slightly.
While the filling cools heat the oven to 200°C/400°F. Line a large baking sheet with greaseproof paper. Unroll the puff pastry sheet on the baking sheet. Tip the squash mixture onto the pastry sheet and shape into a log on one long half of the rectangle. Brush the edge of the pastry with the egg and fold the pastry over. Press the edges down with a fork. Score the top with a sharp knife, brush with egg and sprinkle with nigella seeds.
Bake for 20-30 minutes until the pastry is browned and puffed up. Allow to cool slightly then slice and serve with chutney and salad.
Nutrition information is an estimate and will vary depending on the exact ingredients used.