Bring a pot of well-salted water to a boil over high heat. Blanch the Swiss chard for 5 minutes. Scoop out the chard, and drain well, squeezing out as much of the water as possible. Chop again and set aside.
Keep the pot of water boiling, and add the spaghetti noodles. Follow the directions on the packet for making the spaghetti. Drain and set aside, retaining about 1 cup of liquid from cooking the noodles.
Fry bacon until just crispy. Add the shallot and saute until soft, adding olive oil if needed.
Add the Swiss chard and toss well to break up the chard clumps.
Combine the ricotta and Parmesan cheeses in a small bowl, and add the lemon zest, salt, and red pepper flakes. Add to the Swiss chard mixture in the saute pan and mix well.
Add cooked spaghetti, and some of the pasta water as needed.
Serve warm.