This is a kind of savoury baklava, inspired more by the ingredients themselves (and passing a baklavalari while shopping) than by anything else. I can imagine some more greenery, though it should be something that doesn't shed too much moisture while cooking: arugula or peas rather than spinach. Otherwise, a mixed salad is good with it.
It fed five with a bit left over for dinner, but it would probably work equally well as a buffet dish complicit in feeding a crowd.
Thaw the filo dough (or make your own...)
Crumble the cheese into a large bowl. Cut up the hard-boiled eggs and put those in the bowl as well (don't mix yet!) Chop the onion, mince or press the garlic, and fry in oil for a few minutes until the onion starts to colour. Add this to the cheese and eggs. Grind some black pepper over it and add about 1 tsp dried mint (or a handful of chopped fresh mint) and 1-2 tbsp capers, rinsed to get rid of most of the salt.
Now mix everything very carefully to keep the pieces of egg recognisable.
Grease a not too shallow dish with plenty of oil. Line it with a layer of filo sheets, letting about a third of each sheet extend over the edge. Brush this liberally with oil (it's convenient to have a small bowl of oil handy and use either a brush or your fingers, rather than getting the bottle all greasy). Cover with another layer of filo sheets, this time keeping it inside the dish.
Spread half the filling over the dough. Make another double layer of pastry, brushing the top of each sheet with oil. Repeat with the other half of the filling and the remaining filo sheets.
Fold the flaps of dough that were hanging over the edge over the top. Stir the egg yolk with 1 tsp water and brush the top with it (this will make it golden and crispy).
Bake for about 40 minutes at 175°C.