Preheat the oven to 375 and grease a large casserole dish. In a bowl, place bread cubes and oil, rosemary or thyme, toss to coat. Spread on large rimmed baking sheet. Sprinkle with salt and pepper. Bake until golden and crunchy, stirring occasionally, about 15 to 20 minutes. Return toasted bread cubes to same large bowl. (You want to make sure they are crunchy or it will end up as mush on the bottom of the dish.)
In another bowl, whisk together the eggs, broth, milk, artichoke hearts, spinach, mushrooms, onion, shallots, sundried tomatoes, salt/pepper and herbs. Pour the wet mixture over the bread and let stand for 10 to 15 minutes to allow the bread to soak in the liquid somewhat. Transfer to the casserole dish and sprinkle gruyere over the top. Bake for 45-60 minutes, until the top is brown and crisp and there is no liquid left in the center. Let stand for 10 minutes before serving. This looks so rustic and beautiful, makes for a great breakfast, brunch or anytime meal really.