Shred the zucchini, toss them with a heaping teaspoon of salt and drain in a colander. Reserving the juices.
Meanwhile drop the rice into boiling salted water, bring rapidly back to a boil for 8 minutes; drain and set aside.
Preheat the oven to 400'.
In a large frying pan, cook the onions slowly in 3 to 4 Tbsp. olive oil for 8 to 10 minutes, until tender and translucent. Raise the heat slightly and stir for several minutes until just browned. Stir in the grated and dried zucchini and garlic. Toss for 5 minutes until the zucchini is almost tender.
Sprinkle in the flour, stir over moderate heat for a minute and remove from the heat.
Gradually stir in the 2 ½ cups warm liquid (zucchini juices plus milk heated gently in a pan). Make sure the flour is well blended and smooth. Put the pan over moderately high heat and bring to a simmer, stirring. Remove from the heat again, stir in the blanched rice and ½ cup of the grated parmesan. Taste carefully for seasoning and add your salt and pepper.
Butter a 6-8 cup baking and serving dish that is about 1 ½ to 2 inches deep. Turn the warm zucchini mixture into the prepared pan and sprinkle the remaining parmesan cheese on top. Dribble the remaining olive oil over the cheese.
Bring the gratin to a simmer on stovetop as long as your dish is flame proof. Bake in the upper third of the oven until the gratin is bubbling, top is browned and appears most of the liquid has absorbed. Mine took about 30-35 minutes. Serve warm.
