Peel and finely dice the shallots. Wash thyme, shake dry and, except for 1-2 stems, remove leaves and chop finely. Melt the fat in a pot. Add shallots and chopped thyme.
Steam for about 2 minutes while stirring. Add flour and sweat briefly. Warm the milk and add slowly, stirring continuously. Bring to the boil and let the sauce simmer at low heat for about 4 minutes.
Remove the pot from the heat and stir in the quark. Season to taste with salt, pepper and nutmeg.
Pumpkin clean, wash, grate dry, halve, remove seeds and weigh 900 g pumpkin flesh. Use the rest for other purposes. Halve pumpkin crosswise and cut into slices. Cook slices in boiling salted water for about 3 minutes.
Drain, quench cold and allow to drain.
Heat the oil in a large coated pan. Fry the minced meat for approx. 8 minutes, turning vigorously. Season with salt and pepper. Finally add tomato paste and stir in.
Grease a rectangular casserole dish (18 x 26 cm). Layer half the sauce, half the pumpkin and half the minced meat one after the other. Pour the rest of the sauce on top, layer the rest of the pumpkin and the remaining minced meat.
Sprinkle the casserole with pumpkin seeds and bake in a preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: see manufacturer) for about 30 minutes. About 5 minutes before the end of the cooking time, spread the remaining thyme on the casserole.
Finish baking and serve.