Heat the oven to 450 degrees Fahrenheit/240 degrees Celsius.
Add the eggplant, lamb, onion, oregano, oil, tomato paste, garlic, cinnamon, allspice, red-pepper flakes, 1 3/4 teaspoons salt and a good grind of pepper to a 10-by-13-inch/26-by-34-centimeter (or similar) roasting pan (tin) and mix well to combine. Bake until the mixture is well browned, stirring twice throughout and breaking apart the meat with a spoon, 30 to 35 minutes.
Remove from the oven and continue to break apart the meat very well (don’t worry if you break apart some of the eggplant, too). Add the canned tomatoes with their juices, lightly crushing the tomatoes by hand. Stir in the chicken stock and parsley then return to the oven and bake for another 35 minutes, stirring twice throughout, until the sauce is thick and rich and the eggplant is very soft. Remove from the oven and turn the oven temperature up to 475 degrees Fahrenheit/250 degrees Celsius.
While the casserole is in the oven, prepare the topping: Whisk together the yogurt, yolks, flour, garlic and half the Parmesan with 1/4 teaspoon salt and a good grind of pepper. Once ready, spoon the yogurt mixture over the lamb and eggplant, gently spreading to cover. Top evenly with the remaining Parmesan, feta, pine nuts, parsley and red-pepper flakes.
Bake until golden and bubbling, 15 to 20 minutes. Let cool for about 15 minutes before serving.