Peel the potatoes and leave them to soak in cold water. In the meantime, cut the onion into slices and cook them in a pan with a drizzle of oil and caramelize them for about 2 minutes with the brown sugar, adding a little water. Then take care of the potatoes and cut some of them into small cubes that you will blanch and some into thin slices that you keep aside.
Cut the mozzarella into cubes, roll out the shortcrust pastry on a tray with a diameter of approx. 30 cm lined with baking paper and make it adhere well to the bottom and edges. Prepare the beaten eggs with a pinch of salt and pepper and a little thyme, add the diced mozzarella and grated cheese, caramelized onions and diced potatoes and finally add the sweet pancetta Fiammiferi. Mix all the ingredients well. Pour the mixture over the shortcrust pastry, finish and arrange the thinly sliced potatoes on the surface. Bake at 180/200 °C for about 40 minutes. Serve your rustic cake.