Step 1 Heat the oven to 350 degrees.
Step 2 Heat a large saute pan over medium heat. Add 4 teaspoons canola oil, then the onions. Reduce the heat to medium-low and cook the onions, stirring occasionally, until caramelized, about 30 minutes.
Step 3While the onions are cooking, toss the carrots with the remaining 2 teaspoons oil and spread on a foil-lined baking sheet. Roast the carrots in the oven until tender and just beginning to color, 15 to 20 minutes.
Step 4When the onions are caramelized, stir in the heavy cream and sage and continue to cook until the cream comes to a simmer. Remove from heat.
Step 5In a large bowl, whisk the eggs. Slowly temper the cream mixture into the egg mixture (add a little cream at a time, so the eggs don't scramble). Stir in the Gruyere, carrots and ham, then season with 1 tablespoon salt and one-half teaspoon pepper, or to taste. Stir in the cubed bread.
Step 6Pour the mixture into a 13-by-9-inch baking dish and cover with foil. Place the dish in a larger baking dish and then place the dishes in the oven. Fill the larger dish with hot water halfway up the dish with the bread pudding to form a hot-water bath.
Step 7Bake the bread pudding until it is puffed and set, about 1 hour to 1 hour and 10 minutes. Cool slightly before serving.