Preheat the oven to 200 C fan and line a baking sheet with parchment paper.
Place the potatoes in a saucepan of salted boiling water and cook for 5 minutes. Remove from the water and cool, then grate on a box grater into a large bowl.
Add the onion, thyme, rosemary, salt, pepper, red chilli flakes and parmesan and mix though.
Add the oil to a medium saucepan and place over a medium heat. Add the onion with a pinch of salt and sweat until translucent in colour, stir occasionally and lower the heat if it is starting to brown. Once the onion is translucent, add the garlic and cook for a further few minutes. Add the sausage meat and cook for a further 5 minutes, breaking down the meat with the back of a wooden spoon to prevent any big lumps of meat forming. Add the rest of the ingredients and set aside.
To assemble, butter the holes of a large 6 hole muffin tin and press potato mixture into the base and sides of the holes, leaving a hole in the middle. Fill the middles with the pork mixture and then place a cube of mozzarella inside. Cover with the remaining potato mixture and place in the oven and bake for 30- 40 minutes, until golden brown on the outside.