To make the polenta, set aside a 10 x 10inch shallow baking dish or other comparable dish. Bring the vegetable stock, salt, and rosemary to a boil in a mediumsize saucepan. Reduce the heat to a simmer, then gradually sprinkle in the cornmeal, whisking constantly with a wire whisk. Cook the polenta, whisking all the while, until it begins to pull away from the sides of the pan, about 7 minutes. Whisk in the butter, Parmesan cheese, and mozzarella cheese.
Scrape the polenta into the reserved baking dish and smooth over the top. Let cool for 10 minutes, then cover and chill for at least 1 hour, or until cold throughout. When you are ready to broil the polenta, cut it into 12 squares or diamonds. Lightly brush both sides of each piece with the olive oil, and place the polenta on a baking sheet. Set aside while you cook the vegetables.
To cook the vegetables, melt the butter in a mediumsize skillet over medium heat. Add the largest of the shallots and cover the pan. Cook 5 minutes, shaking the pan occasionally. Add the smaller shallots, sprinkle on the sugar, then sprinkle on a few tablespoons of water. Lower the heat, cover the pan, and cook until caramelized and soft, about 25 minutes. Continue to shake the pan on occasion while the shallots are cooking.
Heat 1 tablespoon of the oil in a large, nonstick skillet over medium heat. Add the shiitake caps and saute until brown and juicy. Remove onto a plate. Add the remaining oil, then toss in the red peppers. Cook 2 minutes, then mix in the zucchini. Cook the vegetables, tossing often, until they are tender, yet crisp. Make a small well in the center of the pan and add the garlic. Cook 1 minute before mixing it into the vegetables. Stir in the shallots and shiitake mushrooms, then season generouly with salt and pepper. Keep the vegetables warm over low heat.
Broil the polenta until golden brown on top and hot throughout. Serve 2 polenta squares on each plate with some vegetables along the center. Garnish with rosemary sprigs