For the croque madame bread pudding: Preheat the oven to 350 degrees F. Put the brioche cubes in a single layer on a large baking sheet and bake until just crisp, about 10 minutes; let cool for 10 minutes.
Butter the sides and bottom of a 9 by 13-inch baking dish. Whisk together 4 of the eggs and the two yolks in a large bowl until smooth. Whisk in the milk, cream, mustard, cayenne, nutmeg, 3/4 cup of the Gruyere and some salt and pepper. Stir in the brioche cubes and cover completely with the custard, pressing the cubes down to fully submerge. Let sit until the bread absorbs all of the custard, about 15 minutes. Transfer the mixture to the prepared baking dish. Bake until the edges are puffed and the center slightly jiggles, about 1 hour. Remove to a baking rack and let cool for 30 minutes.
For the herb-crusted tomatoes: While the bread pudding is cooling, put the bread, parsley, thyme, about 3/4 of the basil and some salt and pepper in a food processor and process until fine.
Heat 2 tablespoons olive oil in a medium nonstick skillet over medium heat. Add the breadcrumbs and toast, stirring occasionally, until toasty smelling and dry, 4 to 5 minutes. Set aside.
Heat the remaining 2 tablespoons olive oil in a large skillet over medium-high heat until shimmering. Add the tomatoes and cook, tossing once or twice, until charred in spots and softened but not saucy, 3 to 4 minutes. Stir in the remaining basil. Top with the toasted breadcrumbs and set aside.
To assemble: Preheat the broiler. Scatter the remaining 3/4 cup Gruyere over the top of the bread pudding and broil until the cheese is bubbly and some of the bread is starting to char, about 2 minutes.
While the bread pudding is broiling, heat the canola oil in a medium nonstick skillet over medium heat. Add the ham and season with pepper. When it begins to sizzle, one at a time crack the remaining 8 eggs into a bowl and slip them on top. Season with salt and pepper, cover, and cook until the whites are set and the yolks are how you like them, anywhere from 2 to 4 minutes.
Put a square of bread pudding on each of 8 plates. Top each square with a few slices of ham and an egg and sprinkle some chives on top. Spoon some tomatoes alongside, and drizzle some balsamic vinegar over all.