Prepare the Zucchini
Slice or dice zucchini evenly and sprinkle lightly with salt; let sit 10–15 minutes.
Pat dry thoroughly with paper towels.
Heat 1 tablespoon olive oil in a skillet and sauté zucchini 3–4 minutes until slightly tender. Remove from heat.
Cook the Ground Beef
Heat remaining olive oil in a skillet over medium heat.
Sauté onion until soft, then add ground beef and cook until browned. Drain excess fat if needed.
Stir in garlic and optional seasonings, cook 1 more minute, then remove from heat and let cool slightly.
Mix the Casserole Base
In a large bowl, whisk eggs and sour cream until smooth.
Add half of the mozzarella and Parmesan, season lightly with salt and pepper.
Fold in cooked beef and zucchini gently until evenly combined. Taste and adjust seasoning.
Assemble and Bake
Preheat oven to 375°F (190°C) and grease a 9×13-inch baking dish.
Spread mixture evenly in the dish.
Sprinkle remaining cheese on top.
Bake uncovered for 35–40 minutes until top is lightly browned and bubbling.
Let rest 10 minutes before slicing to help firm up.