Boil the rice in plenty of salted water; drain before it is completely cooked, let it rest and transfer it into a bowl.
Cut the courgettes into thin rounds and the mozzarella into slices and, in the meantime, preheat the oven at 180 °C.
Add eggs, milk, Grana Padano cheese, oil and 100 gr of ham cubes to the rice and carefully stir.
Oil a springform pan and spread half of the sesame seeds on it. Put half of the rice, on the pan, flattening it with the back of a spoon; put courgettes, mozzarella slices and ham cubes on the rice. Cover with the remaining rice and bake for about 20 minutes.
At this point, spread a little grated Grana Padano, butter flakes and the remaining sesame on the surface of the pie, then grill in the oven for a few minutes.
Remove from the oven, let it cool down and serve cut into slices.