Sauté the vegetables: Melt the butter in a large pot over medium heat and add the diced carrot, celery and onion. Cook, stirring occasionally, until the onion turns soft and translucent, about 5 minutes.
Add the broth: Pour in the chicken broth and raise the heat to bring it to a gentle boil. Scrape up any browned bits from the bottom of the pot as it heats.
Cook the pastina: Stir in the pastina and let it simmer uncovered, stirring now and then so it doesn't stick to the bottom. Cook until the grains turn opaque and tender, 5 to 7 minutes.
Add shredded chicken: If using, stir the shredded chicken into the pot so it warms through alongside the pasta, about 2 minutes.
Temper the egg: In a small bowl, whisk the egg with a ladle of hot broth from the pot until smooth. This warms the egg gradually so it won't scramble when added.
Stir in the egg: Pour the tempered egg mixture back into the pot in a thin stream while stirring constantly. You'll see soft golden ribbons form throughout the soup.
Add parmesan cheese: Stir in the grated parmesan cheese until it melts smoothly into the broth. Taste and adjust salt and pepper as needed.
Finish with parsley: Sprinkle the chopped parsley over the pot and give it one more stir. Remove from the heat so the pastina doesn't keep absorbing too much broth.
Ladle and serve: Spoon the soup into bowls while it's still warm and loose, since it thickens as it sits. Add an extra sprinkle of parmesan on top if you like.