In a medium saucepan, combine onion, heavy cream, garlic and bay leaves over medium-low heat. Simmer for 15 minutes.
Preheat oven to 400 degrees. Lightly grease a 9x13 baking dish.
Spread a very thin layer of spiced cream in the bottom of the prepared baking dish.
Alternating between russet and sweet potatoes, make a layer of potatoes on top of cream. Sprinkle with broccoli florets and ham.
Top with one cup of cheese and season with salt and pepper. Repeat with 2 more layers of potatoes, broccoli and ham.
Pour spiced cream over top of casserole and sprinkle with remaining cheese. Cover with foil and bake for one hour. Remove foil and bake for an additional 15 minutes.