Preheat oven to 375 degrees.
Begin by soaking your leeks. Add sliced leeks to a bowl of cold water for at least 5 minutes before using. The dirt will sink to the bottom of the bowl. Rinse then drain well.
In a large lipped saute pan, add your butter over medium high heat. Once butter is bubbling, add in your washed and drained leeks. Cook for 5 minutes, stirring occasionally, until leeks are lightly browned and translucent.
Stir in asparagus and cook another 2-3 minutes until asparagus is slightly softened.
Stir in your challah bread cubes and thyme, toasting bread and coating in fat and vegetables, for an additional 2-3 minutes. Set pan aside off the heat.
In a large bowl, whisk together the eggs, nutmeg, picked thyme, salt, pepper, granulated garlic and half and half until very well combined and frothy. Stir in bread and vegetable mixture, coating well, and let sit for 5-10 minutes.
Grease a large 10-quart casserole dish or 9x11 pyrex dish with butter. Transfer half of your custard mixture to the dish, spreading evenly, and add half of your ham evenly across the dish. Add remaining custard and finish by adding the remaining ham. Finally, add your gruyere cheese all across the top.
Cover the casserole with parchment-lined foil and bake for 25 minutes. Uncover casserole, and rotate dish 180 degrees. Bake an additional 20-25 minutes until eggs are just puffed and set and top is golden. Let cool at least 10 minutes before serving.