This dish is good for a picnic dinner; it travels well, holds its heat for a long time, and tastes good at room temperature.
Heat oven to 350 degrees. Place sliced leeks in a large bowl of cold water and let sit for about 5 to 10 minutes to rid them of dirt and sand. Lift leeks out of water, drain in a colander, and set aside.
Use a sharp knife to remove kernels from ears of corn and set aside (there should be about 3 cups of kernels). Place corncobs in a medium saucepan. Add milk and nutmeg and bring to a simmer over medium-high heat. Remove from heat, cover, and steep for 30 minutes. Remove corncobs from milk, scraping them with a knife to extract as much flavor as possible. Discard cobs and set milk aside.
Heat olive oil in a large skillet over medium-low heat. Add leeks, 1 teaspoon salt, and 1/4 teaspoon pepper; cook, stirring frequently, until translucent, about 10 minutes. Add squash and 2 tablespoons sage and cook until just tender, 7 to 8 minutes more. Add corn and cook about 3 minutes more. Remove from heat and set aside.
In a large bowl, whisk together the warm milk, eggs, egg yolks, and remaining teaspoon salt and 1/4 teaspoon pepper. Add bread cubes and let stand until bread is soaked to the center, about 10 minutes. Add vegetables and 1 cup cheese and mix well.
Butter a 9-by-13 inch baking dish and transfer bread-and-vegetable mixture to the dish. Sprinkle with remaining tablespoon of sage and cup of cheese.
Bake until pudding is puffed, set, and golden brown, 45 minutes to 1 hour. Serve immediately or at room temperature.