Preheat your grill to medium-high heat. Brush the vegetable slices with olive oil and season with salt and pepper.
Grill the vegetables in batches, turning once, until they are tender and have grill marks, about 3-4 minutes per side for the zucchini, yellow squash, and eggplant, and about 5-6 minutes per side for the bell peppers.
Once grilled, set the vegetables aside to cool slightly. Peel the skin off the bell peppers.
To make the pesto, combine basil leaves, Parmesan cheese, pine nuts, and minced garlic in a food processor. Pulse until coarsely chopped. With the processor running, slowly pour in the olive oil and process until fully incorporated and smooth. Season with salt and pepper.
Line a loaf pan with plastic wrap, leaving enough overhang to cover the top later.
Begin layering the vegetables in the pan, starting with eggplant, then a thin layer of pesto, followed by the yellow squash, another layer of pesto, and then the red and yellow bell peppers. Repeat the layering process until all the vegetables and pesto are used, pressing down gently after each layer.
Fold the overhanging plastic wrap over the top layer of vegetables, pressing gently to compact the terrine. Refrigerate for at least 2 hours or overnight to set.
To serve, unfold the plastic wrap and invert the terrine onto a serving platter. Gently remove the loaf pan and plastic wrap. Slice the terrine and serve with a dollop of the remaining basil pesto.