Peel and finely dice the onion and garlic. Heat 1 tablespoon of oil in a frying pan, sauté the garlic in it and add 100 ml broth. Add spinach and cook over medium heat for about 10 minutes, stirring occasionally.
Meanwhile cook the tortellini in boiling salted water for about 3 minutes. Drain and leave to drain. Drain spinach if necessary and season with salt, pepper and nutmeg. Heat 1 tablespoon of oil in a saucepan and sauté the onion.
Deglaze with 200 ml stock and cream and bring to the boil. Stir in sauce thickener and cook again for at least 1 minute. Season to taste with salt, pepper and lemon juice. Grate cheese finely. Cut ham into strips.
Place the tortellini, spinach and ham in an ovenproof casserole dish, pour the sauce over it and sprinkle with cheese. Gratinate in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: level 3) for approx. 15 minutes.
Remove and serve immediately.