Place a medium saute pan over medium-high heat. Melt butter in pan, drain excess water from leeks, then add leeks to pan. Season with salt, and saute until leeks begin to soften, about 5 minutes, then reduce heat to medium-low. Stir in butter. Cover and cook, stirring occasionally, until leeks are very soft, about 30 minutes. Adjust salt and pepper to taste.
Preheat oven to 350 degrees. While leeks are cooking, spread bread cubes on a baking sheet and bake until dry and pale gold, about 20 minutes, turning pan about halfway through. Transfer to a large bowl, leaving the oven on.
Add leeks, chives and thyme to the bowl of bread; toss well. In another large bowl, lightly whisk the eggs, then whisk in milk or cream, a generous pinch of salt, pepper to taste and a pinch of nutmeg.
Mix cheeses. Sprinkle 1/4 of the cheese mixture in bottom of a 9-by-13-inch well-greased baking pan. Spread 1/2 of bread mixture in pan, and sprinkle with another 1/4 of the cheese. Repeat layers once. Pour in enough milk mixture to cover bread, and gently press on bread so milk soaks in. Let rest 15 minutes.
Add remaining milk mixture, letting some bread cubes protrude. Sprinkle with salt and remaining cheese. Bake until pudding is set and top is brown and bubbling, about 1 1/2 hours. Serve hot.