Preheat oven to 400. Grease or spray a 9×13 pan. Layer the bottom with sliced squash. Spread 1/2 the pesto over the sliced squash, 1/2 of the zucchini slices, 1 cup of cheese, red onion, 1/2 of the fresh herbs, and salt and pepper.
Repeat above step, ending with sliced tomatoes on top.
Place a large piece of foil over the pan to seal.
Bake at 400 for 35-40 minutes, until squash is tender but not overcooked (use a fork to test if it is soft, but do not over cook).
Remove foil; let sit for 10 minutes before serving.