Mix together the mayonnaise, cheeses, chilli and ham in a bowl.
Roll out the pastry on a lightly floured work surface until about 3 mm (⅛ inch) thick. Cut out 8–10 circles, approximately 12 cm (6 inches) in diameter, using a small plate. Place a spoonful of the mixture into the centre of each circle. Brush around the edges with some of the beaten egg, then fold the pastry over and use your fingers or a fork to crimp together the edges. Brush over the tops with the remaining beaten egg.
Transfer the empanadas to a baking sheet and bake in a preheated oven, 200°C (400°F), Gas Mark 6, for 15–20 minutes until golden and crisp. Serve warm.