Preheat the oven to 375F. Line a plate with paper towels. Lightly oil a 1 1/2-quart baking dish or a 9-inch round or square baking pan, or spray with nonstick cooking spray.
In a large, deep skillet, cook the bacon or pancetta over medium-high heat, stirring frequently, until crispy, about 5 minutes. Transfer with a slotted spoon to the paper towel-lined plate. Leave about 1 tablespoon fat in the pan; pour out any extra. Melt 2 tablespoons of the butter in the same skillet over medium heat. Add the breadcrumbs and cook, stirring often, until the breadcrumbs are golden brown and slightly crispy, about 3 minutes. Remove from the heat and scrape the breadcrumbs into a medium bowl. Set aside.
Return the pan to the heat and melt the remaining 2 tablespoons of butter over medium heat. Whisk in the flour and whisk frequently until the mixture is well combined and blond in color, about 2 to 3 minutes. Slowly whisk in the half-and-half or milk and bring to a simmer over medium-high heat. Simmer, whisking frequently, until the mixture is bubbling and thickened, about 5 minutes. Season with salt and pepper and whisk in half of the gruyere until it’s melted, along with the reserved crispy pancetta.
Meanwhile, bring a large pot of salted water to a boil. When the water is boiling, add the cauliflower and cook for about 4 minutes, until crisp-tender. Drain, then add the drained cauliflower to the sauce and toss to combine well. Transfer the sauced cauliflower to the prepared baking dish. Add the remaining 1/2 cup gruyere and the Parmesan to the bowl with toasted breadcrumbs and stir to blend. Sprinkle the mixture over the cauliflower.
Bake for 35 to 40 minutes until bubbling around the edges and golden brown on top. Serve hot or warm.
Notes
If you want to make this a gluten-free casserole, you can use gluten-free flour instead of all-purpose flour. The flour, along with the cheeses and milk, creates a rich, creamy sauce that isn’t at all watery.