In a large bowl, combine the crumbled feta cheese, ricotta cheese, grated mozzarella cheese, and finely chopped spinach or parsley (if using). Mix until well combined.
Season the mixture with salt and black pepper to taste.
Preheat your oven to 375°F (190°C). Line a baking sheet with parchment paper.
Roll out the thawed puff pastry sheets on a lightly floured surface. Cut each sheet into squares (about 4x4 inches / 10x10 cm).
Place a spoonful of the cheese mixture in the center of each pastry square.
Fold the pastry over the filling to form a triangle or rectangle. Press the edges together to seal. You can use a fork to crimp the edges for a decorative touch.
Place the bourekas on the prepared baking sheet. Brush the tops with the beaten egg and sprinkle with sesame seeds or poppy seeds if desired.
Bake in the preheated oven for 15-20 minutes, or until the bourekas are golden brown and puffed up.
Allow the bourekas to cool slightly before serving.
Enjoy your meal!