On a sheet pan, roll out puff pastry or pie dough into a rough rectangle using a rolling pin or your fingers (don't roll puff pastry too thin). Create a little 1/2 inch raised edge. With a fork, prick all over the dough avoiding the edges. Put back in the fridge until you're ready to use.
Preheat oven to 425F.
If using, cook the pancetta in a saute pan until brown. Remove and set aside on paper towel. Discard all but a tablespoon of fat (or use olive oil).
Add the diced chard stems and cook on medium for 2 minutes. Add the onions (with a pinch of kosher salt) and cook until soft and translucent. This can take about 10 minutes or so. Add the garlic and cook about 2 minutes more.
Add the chard leaves and toss them around to coat them with the onion mixture. Pour in the wine and let it reduce 3 or 4 minutes, while you stir the mixture. The chard leaves should be just wilted and the wine should be mostly cooked out. Add kosher salt and pepper to taste. Set mixture aside to cool a bit.
Take pastry out of the fridge and spread the onion and chard mixture evenly on top, leaving a little room around the edge. Sprinkle the pancetta over the chard. Crumble goat cheese over the tart and bake for 12-15 minutes until the puff pastry edges are brown and the goat cheese is warm. You can broil it for a minute if you want the cheese to brown as well.