6 ounces fresh mozzarella cut into 1/2 inch pieces
1/4 cup grated Parmesan
Preheat oven to 400 degrees. In a large skillet, heat oil over medium-high. Add onion and thyme; season with salt and pepper. Cook, stirring occasionally, until onion is golden brown, about 15 minutes (reduce heat if browning too quickly).
Add garlic and sausage. Cook, breaking meat up with a wooden spoon, until browned, about 5 minutes. Add flour and cook, stirring constantly, 30 seconds. Add tomatoes, breaking them up with a spoon. Cook sauce until slightly thickened, 5 to 8 minutes; season with salt and pepper. Discard thyme.
Meanwhile, in a large pot of boiling salted water, cook pasta 4 minutes less than package instructions. Add broccoli to pot and cook 15 seconds. Drain pasta and broccoli and return to pot. Stir in sausage mixture. Transfer to a 3-quart baking dish or divide among four 16-ounce gratin dishes. Top with mozzarella and Parmesan. Bake until cheese has melted and liquid is bubbling, about 15 minutes.