Preheat oven to 375 degrees. Lightly oil a 9-x-13-inch gratin or baking dish.
In a separate pot, bring water to a boil and add 1/2 teaspoon of salt, broccoli and garlic. Simmer the broccoli and garlic for 5 minutes, until softened. With a slotted spoon remove the broccoli and garlic to a large bowl. Bring the water back to the boil, add the pasta, and cook the pasta for about 2 minutes less than the package directions suggest, about 11 minutes. The pasta should be al dente, a little firm.
Meanwhile, in a large Dutch oven set over medium-high heat, heat the oil. Add sausage and the garlic cloves from the broccoli bowl, and cook, stirring frequently until meat is fully cooked and no longer pink, about 4 to 5 minutes, if using fresh sausage. (If using fully cooked sausage, cook until surface is golden, about 2 to 3 minutes.) With a slotted spoon, transfer sausage to the broccoli, and drain most of the oil from the pan, leaving about 2 tablespoons. Discard the garlic.
Toss drained pasta with sausage mixture. Add beans, stock, 3/4 cup of grated mozzarella cheese and all of the ricotta. Add remaining salt and pepper. Gently toss. Transfer to prepared gratin or baking dish, top with breadcrumbs, remaining 1/4 cup of grated cheese and 1/4 cup mozzarella cheese, and drizzle with olive oil.
If making this in advance, allow the mixture to come to room temperature, cover with plastic wrap and place in the refrigerator.
Bake for 25 minutes, until heated through and crusty on top.