Preheat the oven to 350°F.
Cook the halved spaghetti in accordance with the package directions. Drain well once tender and place the pasta in a large mixing bowl. Do not rinse, as the natural starch helps the sauce cling to the noodles.
Meanwhile, set a large stockpot over medium heat and melt the butter. Add the chopped onion and minced garlic, then sauté for about 4 minutes, or until the onion is soft and translucent.
Sprinkle in the flour, sea salt, and black pepper. Whisk continuously for 30 to 60 seconds, allowing the mixture to bubble lightly so the flour loses its raw flavor.
Gradually pour in the chicken stock and milk, whisking steadily until smooth. Continue cooking until the sauce begins to thicken slightly.
Add the Parmesan, Italian seasoning, and 1 cup of mozzarella. Whisk until the cheeses are fully melted and the sauce becomes smooth and creamy.
Pour the finished sauce over the drained spaghetti. Add the broccoli florets and cooked chicken, then stir until all components are evenly coated and well combined.
Transfer the mixture to a 9×9-inch baking dish. Scatter the remaining 1 cup of shredded mozzarella evenly across the top.
Cover the dish with a lid or aluminum foil and bake for 20 minutes. Remove the cover and continue baking for 10 minutes more, or until the casserole is bubbling and the cheese on top is lightly golden.
Remove from the oven and let the casserole rest briefly before serving warm.