Generously smear a 9x13x2 baking dish with softened butter.
Stir together flour, mustard powder and optional cayenne. Combine ham cubes and cheese cubes; toss with flour mixture until well-coated. Add bread cubes and toss to distribute.
Whisk together eggs, milk and hot sauce.
Spread 1/3 of bread/ham/cheese cubes in a single layer in prepared baking dish. Drizzle with 1 tbsp melted butter, then sprinkle with 1 tbsp grated Parmesan. Repeat twice more, to form three layers. Pour egg mixture evenly over the top, then sprinkle with the last 1 tbsp of Parmesan. (The dish can be covered with plastic wrap and refrigerated overnight if desired. Let it come back up to room temperature while preheating the oven, at least 30 minutes, before proceeding.).
Preheat oven to 350°F Bake, uncovered, until set, golden brown and crispy, about 1 hour.