Preheat the oven to 400°F (205°C) and position a rack in the middle of the oven.
Bring a large pot of well-salted water to a boil—it should taste as salty as the sea. Add the cauliflower and cook for 5 minutes; the florets should be very al dente since they will continue cooking in the oven. Drain thoroughly and set aside.
In a medium saucepan over medium heat, melt the butter. Whisk in the flour and cook for 1 to 2 minutes, until the mixture is bubbling but not browned. Gradually whisk in the warm milk. Bring the sauce to a gentle boil, whisking frequently and using a flat whisk or rubber spatula to scrape the edges of the pan to keep the sauce smooth. Reduce the heat and simmer, stirring often, until thick enough to coat the back of a spoon, about 3 to 5 minutes. Season with 1 teaspoon salt, ¼ teaspoon pepper, and the nutmeg. Stir in half of the Gruyère and 2 tablespoons of the Pecorino Romano, whisking until smooth.
Spread about one-third of the sauce over the bottom of a 2-quart or 8-inch square baking dish. Evenly arrange the par-cooked cauliflower on top, then pour the remaining sauce over the florets. Sprinkle the remaining Gruyère on top.
In a small bowl, combine the panko breadcrumbs with the olive oil, the remaining Pecorino Romano, thyme, and a pinch of salt and pepper. Sprinkle this mixture evenly over the cauliflower.
Bake uncovered for 25 to 30 minutes, until the topping is golden brown and the sauce is bubbling at the edges. Let the dish rest for at least 10 minutes before serving to allow it to set.
