Preheat oven to 450 degrees and brush 2 baking sheets with some of the olive oil.
Arrange as many vegetables as possible in one layer on sheets. Brush vegetables with some remaining oil and season with salt and pepper. Roast vegetables in middle and lower thirds of oven, switching positions of sheets in oven halfway through roasting, until just tender and lightly browned, 10 to 15 minutes. Transfer vegetables as roasted to a tray, arranging them in one layer. Roast remaining vegetables in same manner. Vegetables may be roasted 1 day ahead, cooled completely, and chilled, layered between sheets of plastic wrap on trays and covered. Bring vegetables to room temperature before proceeding.
In a small bowl, stir together ricotta, thyme, and salt and pepper to taste.
Put 1 eggplant slice on a lightly oiled baking sheet. Spread 1 tablespoon ricotta mixture over eggplant. Cover ricotta mixture with 2 potato slices and layer with 2 zucchini slices, 1 onion slice, 1 mozzarella slice, 2 tomato slices, and 2 zucchini slices. Spread 1 tablespoon ricotta mixture over zucchini and top with 1 eggplant slice. Make 3 more napoleons, using remaining vegetables, ricotta mixture, and mozzarella in same manner.
Insert a metal or wooden skewer through center of each napoleon to make a hole from top to bottom. Trim rosemary sprigs to 1 inch taller than napoleons and remove bottom leaves from each sprig, leaving about 1 inch of leaves around top. Insert 1 sprig into each napoleon and bake in middle of oven 5 minutes, or until mozzarella is melted and vegetables are heated through.
Recipe courtesy of Gourmet Magazine