Preheat oven to 400°F. Toss zucchini with salt in a large bowl, then spread out in an even layer on a baking sheet lined with paper towels. Let rest for 15 to 30 minutes to allow water to leech out of the zucchini. Pat dry and brush off the salt from the sliced zucchini.
2 pounds zucchini,, 2 teaspoons kosher salt
Meanwhile, melt 1 Tablespoon of the butter in a large pan over medium-high heat. Add sliced onions and saute for 5-7 minutes until softened. Add garlic and saute for another seconds.
3 tablespoons melted butter,, 1 medium sweet onion,, 4 cloves garlic,
Add heavy cream, dried basil, onion powder, thyme, oregano, salt, and pepper to the sauteed onions in the pan. Bring to a simmer for about 3 minutes. Remove the pan from the heat and stir in the sour cream and ¾ cup of the gruyere cheese until melted.
1 cup heavy cream, 1 ½ teaspoons dried basil, 1 teaspoon onion powder, ½ teaspoon dried thyme, ½ teaspoon dried oregano, ½ teaspoon kosher salt, ½ teaspoon black pepper, 1 cup shredded Gruyere cheese, ½ cup sour cream
Arrange half of the zucchini in the bottom of a 2-quart baking dish. It's okay for them to overlap. Spoon half of the onions and sauce over the zucchini. Layer the remaining zucchini and sauce. Sprinkle the remaining ¼ cup gruyere cheese, mozzarella cheese, and Parmesan cheese on top. Cover with foil and bake 30 minutes.
¼ cup freshly grated Parmesan cheese, ⅔ cup shredded mozzarella cheese
While the casserole bakes, melt the remaining 2 Tablespoons of butter in another pan. Add the Panko breadcrumbs and toast over medium heat until golden brown.
½ cup Panko breadcrumbs
Remove the foil covering the casserole and sprinkle with the toasted breadcrumbs. Bake uncovered for 5 minutes. Let rest 5-10 minutes before serving.