Prep the pan and bread. Butter a 9x13-inch baking dish. Add the sourdough cubes (toast them first at 350°F for 12 to 15 minutes if the bread is fresh).
Brown the sausage. In a large skillet over medium-high heat, cook the sausage 7 to 8 minutes, breaking it up, until browned and cooked through. Transfer to a paper-towel-lined plate, leaving about 1 tablespoon of fat in the pan.
Cook the vegetables. Add the butter, onion, and red pepper to the skillet. Cook 5 to 6 minutes until softened. Stir in the spinach and cook 1 minute, just until wilted. Let cool 5 minutes.
Layer. Scatter the sausage, vegetables, 1 1/2 cups of the cheddar, and 1/2 cup of the Gruyère over the bread. Toss gently with your hands so the fillings are spread through every layer.
Make the custard. In a large bowl, whisk the eggs, milk, cream, Dijon, salt, pepper, thyme, and nutmeg until completely smooth, with no streaks of yolk.
Soak. Pour the custard evenly over the casserole. Press the bread down with a spatula so every cube is moistened.
Sprinkle the remaining 1/2 cup cheddar and 1/2 cup Gruyère over the top.
Heat the oven to 350°F (175°C).
Bake covered. Cover with foil and bake 30 minutes.
Bake uncovered. Remove the foil and bake 20 to 30 minutes more, until puffed and golden, the center no longer jiggles, and a knife in the middle comes out clean (160°F on a thermometer). If the top browns before the center sets, lay the foil loosely back over it.
Rest and serve. Let stand 10 minutes so it slices cleanly. Sprinkle with chives or parsley and serve warm.