Soak the beans: place the beans in a vessel, and cover with 3-4 cups of water, and soak for 5 hours or overnight. If soaking overnight, cover with plastic wrap and refrigerate. If soaking for 5 hours, the countertop should suffice.
Cook the beans: Place beans in a pressure cooker, ensuring that they are completely submerged with water. That should be about 3-3½ cups. Add in the bay leaves, celery, carrots, chiles de Árbol, thyme sprigs, rosemary sprigs, and garlic. Bring your pressure cooker up to pressure over high heat. Once pressure is achieved, reduce heat to medium, and cook for 12 minutes. Once the time is up, turn off the heat, and let the pressure release naturally.
Saute the onions and tomatoes: Heat a saute pan over medium heat, and add the olive oil. When the oil starts to shimmer, add in the onions, and cook until translucent, about 5-7 minutes. Add in the whole tomatoes, crushing them, and separating them with your hands as you add them to the pan with the onions. Stir, cooking the liquid off, until most of the tomato liquid has evaporated, but the tomato flesh is not yet sticking to the pan.
Prepare the cooked beans: Once the pressure has naturally released from your pressure cooker, remove the lid carefully, tilting the lid away from you and allowing the condensation to fall back into the pot. Remove the carrot, bay leaves, celery, chiles, and herb sprigs, leaving the garlic.
Finish the soup: Add the vinegar, salt and pepper to the tomato mixture and mix to combine. Then add the beans along with their liquid, and vegetable stock. Turn the heat up to high, and bring the mixture to a boil. Add in the pasta and spinach, cooking for about 5-8 minutes, or until the shells are tender. Divide into 4 bowls, and top with grated Parmesan cheese. Serve with garlic bread if desired.