Prep the zucchini. Use a mandoline or sharp knife to slice zucchini lengthwise into 1/8- to 1/4-inch planks. Lay slices on paper towels, sprinkle lightly with salt, and let sit 15 minutes to draw out moisture.
Pat dry.
Optional pre-bake for less moisture. Arrange zucchini slices on two parchment-lined sheet pans and bake at 400°F (200°C) for 8–10 minutes. This step helps prevent a watery casserole.
Make the meat sauce. Heat a large skillet over medium-high. Add ground beef (and olive oil if needed).
Cook, breaking it up, until browned. Add onion and cook 3 minutes, then stir in garlic for 30 seconds.
Season and simmer. Stir in marinara, Italian seasoning, red pepper flakes, 1/2 teaspoon salt, and a few grinds of pepper. Reduce heat and simmer 5–8 minutes to thicken slightly.
Taste and adjust seasoning.
Mix the ricotta layer. In a bowl, combine ricotta, egg, 1/4 cup Parmesan, a pinch of salt, and pepper. Mix until smooth.
Assemble. Lightly grease a 9x13-inch baking dish. Spread a thin layer of meat sauce on the bottom.
Add a layer of zucchini slices, slightly overlapping. Dollop and gently spread half the ricotta mixture, then sprinkle with 1/3 of the mozzarella.
Repeat layers. Add more meat sauce, another zucchini layer, the remaining ricotta, and another 1/3 of the mozzarella. Finish with remaining meat sauce, a final zucchini layer, and the rest of the mozzarella plus remaining 1/4 cup Parmesan.
Bake. Cover loosely with foil (tent so cheese doesn’t stick) and bake at 375°F (190°C) for 25 minutes.
Uncover and bake 12–15 more minutes, until bubbling and golden in spots.
Rest and garnish. Let the casserole rest 10–15 minutes to set. Sprinkle with chopped basil or parsley before serving.