Bring a large pot of water to a rolling boil. Salt the water. Prepare an ice bath and set aside.
Remove the Swiss chard leaves from the stems and blanch in the boiling water for about 1-2 minutes. Retrieve the Swiss chard with a strainer or tongs and transfer to the ice bath. Drain the Swiss chard well - if you have a salad spinner, this helps. Roll the Swiss chard in a clean kitchen towel to remove any excess water, and try to dry as much as possible.
Place the blanched Swiss chard (you should have about 1 1/2 to 2 cups) in the bowl of a food processor, along with the toasted walnuts, Parmigiano Reggiano and Piave Vecchio cheese and garlic and process until smooth. With the food processor running, add the olive oil slowly, until it is well blended. Season to taste with salt and pepper.
Meanwhile, in the same large pot that you blanched the Swiss chard, cook the pasta according to the package directions. Drain, reserving about a cup of the pasta water. Transfer the cooked pasta to a large bowl.
Add the shredded chicken to the pasta, if you are using. Use about 1 cup of the pesto to dress the pasta, and toss well until it is evenly coated. Use some of the reserved pasta water to make it easier to coat the pasta, adding in small increments. Season to taste with salt and pepper and serve with additional toasted walnuts and shaved Parmigiano Reggiano cheese. Serve immediately or at room temperature.
To toast the walnuts, spread the nuts on a baking sheet and roast in a 350° F oven for 8-10 minutes.