Preheat the oven to 375°F and lightly grease a 9×13-inch baking dish.
Cut the cauliflower into small, evenly sized florets. Rinse and drain thoroughly.
Cook the bacon in a large skillet over medium heat until crisp.
Transfer the bacon to a paper-towel-lined plate. Let it cool, then crumble it. Reserve approximately one-third for the topping.
Steam the cauliflower for five to seven minutes, until fork-tender but not overly soft.
Transfer the cauliflower to a paper-towel-lined tray and pat it dry. Let it rest for approximately five minutes.
Place a large saucepan over low heat.
Add the butter, cream cheese, and heavy cream.
Stir until the butter melts and the cream cheese becomes smooth.
Add the garlic powder, onion powder, smoked paprika, and black pepper.
Remove the saucepan from direct heat.
Add two cups of cheddar cheese about ½ cup at a time, stirring until melted after each addition.
Add the mozzarella and stir until the sauce is smooth.
If needed, whisk in ⅛ teaspoon xanthan gum and let the sauce rest for one to two minutes.
Place the dried cauliflower in a large mixing bowl.
Pour the cheese sauce over the cauliflower.
Add approximately two-thirds of the crumbled bacon.
Fold gently until the cauliflower is evenly coated.
Transfer the mixture to the prepared baking dish.
Top with the remaining ½ cup of cheddar and the reserved bacon.
Bake uncovered for 15 to 20 minutes, until melted and bubbling.
Broil for one to two minutes for a more golden top, watching closely.
Let the casserole rest for approximately five minutes.
Top with green onions, optional sour cream, and black pepper before serving.