01 - Preheat your oven to 375°F (190°C). Lightly grease a 9x13-inch baking dish.
02 - Steam or blanch the broccoli florets for 2–3 minutes until they are just tender and bright green. Drain them thoroughly and set aside.
03 - In a large skillet over medium heat, melt 2 tablespoons of unsalted butter. Add the finely chopped onion and cook for 3–4 minutes until it becomes translucent. Stir in the minced garlic and cook for an additional 1 minute until fragrant.
04 - Sprinkle the all-purpose flour over the onion and garlic mixture. Cook, stirring constantly, for 1 minute to create a golden roux.
05 - Gradually whisk in the whole milk until fully incorporated. Add the salt, black pepper, paprika, and dried thyme (if using). Continue whisking over medium heat until the sauce thickens to a creamy consistency, approximately 3–4 minutes.
06 - Remove the skillet from the heat. Stir in 1 cup of the shredded sharp cheddar cheese and ½ cup of the grated Parmesan cheese until they are completely melted and the sauce is smooth.
07 - In a large mixing bowl, gently combine the cooked rice, blanched broccoli florets, the prepared cheese sauce, and half of the remaining cheddar and Parmesan cheeses. Mix thoroughly to ensure all components are evenly coated.
08 - Evenly spread the combined casserole mixture into the prepared baking dish.
09 - In a small bowl, combine the panko breadcrumbs with the melted butter, if using for the topping. Sprinkle the remaining cheddar cheese, Parmesan cheese, and the buttered panko evenly over the surface of the casserole.
10 - Bake in the preheated oven for 25–30 minutes, or until the topping is golden brown and the casserole is bubbling merrily.
11 - Allow the baked casserole to rest for 5–10 minutes before serving to allow it to set.