Position a rack 4" from broiler, and heat to high. Place both peppers on a foil-lined baking sheet, and broil, turning as needed, until charred all over, about 30 minutes. Transfer to a bowl, and cover with plastic wrap; let sit for 20 minutes. Peel, core, and seed peppers; set aside. Heat oven to 450°. Brush two foil-lined baking sheets with oil. Place eggplant slices on one baking sheet and zucchini and squash slices on second baking sheet; brush with more oil, and season with salt and pepper. Roast vegetables, turning as needed, until tender, about 35–40 minutes; let cool.
Bring a 4-qt. saucepan of water to a boil; add spinach, and cook until wilted, about 2 minutes. Drain and squeeze dry with a kitchen towel; set aside. Combine 1⁄4 cup oil, goat cheese, half the basil, oregano, parsley, thyme, and half the chile flakes in a medium bowl; season with salt and pepper, and mix until smooth; set goat cheese mixture aside. Place sun-dried tomatoes and garlic in a bowl, and cover with 2 cups boiling water; let sit for 10 minutes. Drain and transfer to a food processor along with 1⁄4 cup oil, remaining basil and chile flakes, walnuts, Parmesan, and vinegar; season with salt and pepper, puree, and set pesto aside.
Line a 9" x 5" loaf pan with plastic wrap, letting at least 4" hang over the edges. Use 2⁄3 of the spinach to line the 4 sides of the pan. Place eggplant slices on bottom, and then cover with half the pesto; top with zucchini slices and then the goat cheese mixture. Spread peppers over goat cheese mixture, and then top with remaining pesto; top with squash, and then the remaining spinach. Fold excess plastic over top of terrine, and cover with a piece of cardboard cut to fit inside the rim of the pan. Place three 15-oz. cans on top to weigh down terrine, and refrigerate for at least 8 hours or overnight. Unwrap, and invert terrine onto a serving platter; cut into 1"-thick slices to serve.