1. Heat oven to 350°F and spray a 9x13-inch baking pan.
2. Fill a pot with water and heat over medium heat; add the potatoes and boil until tender when pierced with a knife, about 10 minutes. Drain the potatoes and set aside.
3. In a large bowl, mix potatoes, steamed broccoli, cubed ham and chopped, cooked bacon.
4. Heat the butter over medium heat until melted; whisk in the flour and cook for 1 minute. Slowly whisk in milk, salt, pepper, garlic powder, and onion powder and cook until milk is just about boiling. Whisk in the Cheddar cheese until melted. Remove from heat.
5. Pour the cheese sauce over the ham, potato and broccoli mix. Stir well; add cream cheese cubes; mix one more time.
6. Transfer the mixture to greased baking dish, top with mozzarella cheese and bake at 350°F for 25 to 35 minutes.