In a hot skillet over medium heat, sauté onion and a pinch of salt in olive oil until tender. Remove and set aside.
In the same hot pan, add the pear slices, sprinkle with a pinch of cinnamon and sauté for about 2 minutes on each side, until lightly browned. Season with salt and pepper, then set aside.
In a bowl, mix ricotta, feta, green onions, salt and pepper.
Place puff pastry on a baking sheet lined with parchment paper or a silicone mat.
Using a knife, score the dough from the center to form star-shaped triangles, without cutting all the way to the edge. These triangles will be used to fold the pastry over the filling.
Along the edge of the pastry, form a crown by arranging the fried onions, then on top, spread the pear slices, then the ricotta-feta mixture and finally the pieces of cooked ham.
Fold the dough triangles over the filling, from the center outwards, to create a crown with open and closed areas.
Brush pastry with beaten egg.
Bake for 25 minutes, until golden and crisp.
Serve warm, with a green salad or pickled vegetables for a contrast of flavors.