Preheat the oven to 375 degrees F (190 degrees C). Lightly butter a 9x9-inch pan.
Combine Cheddar, Parmesan, garlic, oregano, and basil in a large bowl. Season with salt and pepper, and set aside.
Arrange 1/2 of the zucchini slices in the pan. Sprinkle 1/4 of the cheese and herb mixture on top. Arrange 1/2 of the tomatoes and top with another 1/4 of the cheese mixture. Repeat layers.
Melt butter in a skillet over medium heat. Stir in onions and cook until soft and translucent. Stir in bread crumbs; cook until they have absorbed the butter. Sprinkle on top of casserole.
Cover loosely with foil and bake in the preheated oven for 25 minutes. Remove foil and bake until the top is crusty and vegetables are tender, about 20 minutes.