Cook the cannellini and kidney beans together. Meanwhile, heat the oven to 450°F. In a large bowl, toss the fennel, celery, and carrots with the oil; season generously with salt and pepper. Spread on a rimmed baking sheet lined with foil. Roast, tossing after 10 minutes and every 5 minutes thereafter, until the vegetables are nicely browned and tender when pierced with a fork, about 30 minutes. Let cool for at least 15 minutes. Transfer the vegetables to a cutting board, chop them coarsely, and put them in a large pot. Slice the tomatoes into large pieces and add them and their juices, the beans, 3 cups of their cooking liquid (or add water to equal this amount), and 1 Tbs. of the rosemary to the pot. Bring to a boil, turn the heat to medium low, cover, and simmer for 40 minutes, stirring occasionally. Thin with water, if necessary, to get the consistency you like. Stir in the cooked pasta, the remaining 1 tsp. rosemary, the parsley, 1/4 cup of the Parmigiano, and salt and pepper to taste. Ladle into bowls and serve immediately with a generous sprinkle of the remaining Parmigiano.