Preheat the oven to 425 degrees F (220 degrees C).
Bring a large pot of salted water to a boil. Quarter broccoli heads lengthwise and add to the boiling water; simmer for 3 minutes. Drain.
Melt butter in a medium pot over medium heat. Stir in flour and cook for 1 minute. Whisk in milk. Bring to a simmer; cook until thickened, about 5 minutes. Remove from heat and stir in Parmesan cheese, pepper, and salt.
Transfer drained broccoli to a 9×13-inch baking dish. Pour sauce on top.
Bake in the preheated oven until hot and bubbly, about 15 minutes. Broil until top starts to brown, 2 to 3 minutes.