Arrange a rack at center position and preheat oven to 425 degrees. Oil a large (2- to 2½-quart) baking dish with some of the olive oil.
Trim and discard ends from the zucchini, and cut them into ¼-inch-thick slices. Stem tomatoes and cut them into ¼-inch thick slices.
Set 2 large skillets over medium heat and add about 2 tablespoons oil (or enough to coat the bottoms of the pans) to each. When hot, add enough zucchini slices to each pan to fit snugly in a single layer. Cook, turning several times, until slices are well browned on both sides, and very tender when pierced with a knife, about 8 minutes. Remove and drain on paper towels. Repeat with remaining zucchini, adding more oil if needed, to pans.
Arrange half of the zucchini slices, slightly overlapping, in the oiled baking dish; salt and pepper them, then sprinkle with ½ teaspoon of the rosemary. Arrange tomato slices, slightly overlapping, over the zucchini. Season tomatoes with salt, pepper, and ½ teaspoon rosemary. Make a final layer with remaining zucchini, and season them with salt, pepper, and remaining ½ teaspoon rosemary.
For the topping, combine bread crumbs and Parmigiano cheese in a bowl and spread over the vegetables. Dot with feta, and if you like, sprinkle with pine nuts. Drizzle gratin with 1 tablespoon of olive oil. Bake until vegetables are tender and topping is golden and crisp, about 20 minutes.
Cool gratin 10 minutes before serving. Garnish the gratin with some fresh rosemary sprigs if desired. (The gratin can be prepared 6 hours ahead; cool, then cover loosely with foil. Either refrigerate or leave at cool room temperature.)