Preheat the oven to 200 degrees. Heat the oil in a large frying pan to a higher temperature and sauté the onions and broccoli until the onions are golden brown. Then add the torn spinach leaves and the grated garlic. Simmer together, stirring occasionally, for about 5 minutes, then remove from the heat. Spread the dough into a greased pie pan and leave the edges raised.
Spread the broccoli mixture over the dough. In a small bowl, mix together the pepper, salt, rosemary, milk and egg. Add half the amount of both grated cheeses and mix well with the eggs. Pour this mixture over the vegetables and sprinkle the top of the pie with the remaining cheeses. Place the pie in a preheated oven and bake for about 35 minutes. Once baked, remove from the oven and allow to rest for 15 minutes before slicing.