Preheat the oven to 400° F. Prepare a 9″ square baking dish with olive oil or vegan butter.
Add all ingredients for vegan parmesan to a food processor and mix/pulse until a fine meal is achieved.
Shred the zucchini and toss with a heaping teaspoon of salt. Transfer to a colander and place over a bowl to collect the zucchini juice.
After 30-45 minutes, transfer to a nut bag or clean (no lint) kitchen towel and squeeze excess water out of the zucchini. Set the zucchini aside.
While zucchini drains, bring a small pot of salted water to a boil.
Stir in rice and bring back to a rapid boil for 8 minutes.
Drain, running cold water over the rice. Transfer to a colander and dry with a paper towel.
Heat 4 tablespoons oil in a large heavy bottom pan over medium heat. Cook onions for 8 to 10 minutes until onions are slightly browned.
While onion cooks, transfer 1 cup zucchini water and 1 cup of nut milk to blender. Add whole wheat flour, nutritional yeast, dry mustard and cashew pieces. Blend until very smooth.
Add the zucchini, garlic and dry sherry to the onions and garlic in the pan, toss, and cook until the zucchini is almost tender, 4 – 5 minutes.
Gradually stir in the nut milk zucchini juice mixture.
Put the pan over moderately high heat and bring to a simmer, stirring.
Remove from the heat, stir in the red pepper flakes, lemon juice, mayonnaise blanched rice, 1/2 cup of the vegan parmesan and 1 tablespoon chopped parsley. Add more zucchini juice and nut milk if the sauce is too thick.
Taste and adjust seasoning. Add additional salt and freshly ground black pepper if needed.
Melt vegan butter in a small pan. Toss with bread crumbs.
Turn the zucchini mixture into the prepared baking dish and sprinkle the remaining vegan parmesan, parsley and buttered bread crumbs on top.
Bake until the gratin is bubbling, the top has browned and it appears that most of the liquid has absorbed, about 30-35 minutes
Let it sit for about 8 to 10 minutes before serving.