Preheat oven to 425 (220 C) degrees.
Peel the eggplant, if desired, or leave some of the skin on in strips. Trim off the stem and sliced into quarters lengthwise, then slice into 1-inch thick half moons.
Put the eggplant in a large bowl with the zucchini, bell pepper and onion. Drizzle with the olive oil, 1 teaspoon salt and the chopped thyme and toss together.
Stir the remaining ½ teaspoon salt, garlic, crushed red pepper and black pepper into the tomato puree or crushed tomatoes. Spread over the bottom of a 4-5 quart casserole or baking dish.
Arrange the vegetables in the dish in one layer. Top with the sliced tomatoes and thyme sprigs. Bake 30-35 minutes. The juices should be bubbling and the eggplant tender when pierced with a the tip of a knife. Remove the thyme stems (you can crumble the leaves over the dish first).
Sprinkle the cheese over the ratatouille and drizzle with the pesto. Serve warm or at room temperature.
