Peel onion and garlic. Dice onion, press garlic through a garlic press. Heat olive oil in a pot, fry onion and garlic in it. Dust with flour, sweat briefly and add stock.
Cut the tomatoes in the tin roughly with a long knife and add them together with the tomato paste. Season with salt, pepper and pizza spice, bring to the boil and simmer for 6-8 minutes. Cook the pasta in boiling salted water according to the instructions on the packet.
Clean and wash broccoli and cut into florets. Peel and chop the stalk. Add the broccoli to the pasta 3-4 minutes before the end of the cooking time. Pour pasta and broccoli onto a sieve, rinse briefly under cold water and drain.
Clean, clean and halve the mushrooms. Heat the fat in a coated pan and fry the mushrooms until golden brown, turning them over. Season with salt and pepper. Dice the ham. Cut mozzarella into slices.
Grease one large or 4 small ramekins. Mix the broccoli pasta, mushrooms and ham and pour in the mixture. Pour hot tomato sauce over it and cover with the mozzarella. Bake in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: level 3) for about 25 minutes.
Serve garnished with thyme.