Heat the olive oil in a large Dutch oven or soup pot over medium heat. Add the onion, carrot, celery, and a pinch of the salt. Cook, stirring occasionally, until the vegetables soften, about 6 to 8 minutes.
Add the garlic and rosemary. Stir for about 30 seconds, just until fragrant. Stir in the tomato paste and cook for 1 minute to deepen its flavor.
Add the crushed tomatoes, drained beans, vegetable broth, remaining salt, and black pepper. Increase the heat and bring the soup to a gentle boil.
Spoon about 1 cup of the beans into a bowl and mash them roughly with a fork. Return the mashed beans to the pot; this naturally thickens the broth without needing a blender.
Stir in the ditalini. Reduce the heat to maintain a steady simmer and cook, stirring often so the pasta does not stick, until tender, about 9 to 11 minutes.
Taste and adjust the salt and pepper. If the soup becomes thicker than you like, stir in a splash of hot water or broth. Ladle into bowls and finish with parsley and cheese, if using.