Heat olive oil and add chopped onion, carrots, celery and garlic. Cook for about 2-3 minutes until fragrant. If using tomato paste, add it now as well.
If using pancetta or other bacon, add it now and cook for another 1-2 minutes. Add lentils, tomato puree and chili flakes (if using) and herbs. pour enough broth to cover the lentils by about an inch.
Cook lentils for about 30-40 minutes, until lentils are al dente (soft but with a little bite).
Remove herbs. Add the pasta and add more broth to cover the pasta. Cook for about 10 minutes.
If you want it to be more soupy, add more broth.
Finish with salt and pepper to taste. If using Parmigiano Reggiano, grate it into the pot now. Serve with parsley, if desired.
If you need more liquid after adding the Parmigiano Reggiano, add a little broth. You can also use nutritional yeast instead for the umami flavor (will not make it more creamy).