Warm 2 tablespoons of the extra-virgin Greek olive oil in a large skillet and cook the chopped onions for 5 to 7 minutes, until they look translucent. Stir in the beef, breaking it into crumbles as the first browned spots appear.
Stir the garlic, tomatoes, cinnamon, nutmeg, allspice, cloves, peppercorns, and salt into the beef, then turn down the heat, cover the skillet, and simmer for 35 to 40 minutes. Add water if the mixture gets too dry before the beef cooks through, but finish with no loose liquid in the skillet.
Move the skillet off the burner and give the filling a chance to cool slightly before picking out the cinnamon stick, cloves, and peppercorns. Check through the crumbles so none of the whole spices end up in the layers.
Use the beef’s simmering time to boil the pasta until it’s firm in the center without tasting raw. Drain it, cool it under cold water, then drain it thoroughly again before tossing it with 1 to 2 tablespoons of the extra-virgin Greek olive oil and half the grated cheese.
Set the oven to 350 °F (180 °C) and brush a light coat of oil over the inside of the large, deep baking pan. The listed dimensions are 25 × 35 cm and 8 cm deep, or 10 × 14 inches and 3.5 inches deep.
Melt the butter over medium heat in a medium saucepan, then add the flour as soon as the butter starts to bubble and beat it briskly with a wire whisk. Keep the whisk moving for several minutes, until the paste turns pale gold.
Whisk the milk into the roux, followed by the heavy cream, and stir over medium heat for 10 to 12 minutes. Season with salt once the sauce is thick enough to hold soft ridges.
Take the saucepan off the burner, let the sauce cool slightly, then whisk in the beaten yolks briskly. Stir in the crumbled Anthotyro or Myzithra and half of the grated cheese that remains once the yolks are blended in.
Coat the noodles with a little béchamel and spread half of them across the oiled pan. Cover the noodles evenly with the beef sauce, scatter 1 to 2 tablespoons of grated cheese over it, and cover with the other half of the noodles.
Spoon the béchamel across the upper layer of pasta and smooth it out to the edges. Scatter the rest of the grated cheese evenly over the surface.
Bake the pastitsio for about 45 minutes. Take it out when the béchamel has set and puffed and a golden brown crust covers the top.