Wash chard and remove stems from leaves. Chop the stems and leaves and keep in separate piles. Set aside.
Bring a large pot of water to a boil, add 2 tsp. of salt, and add spaghetti. Cook spaghetti according to package directions.
In a medium saucepan, heat olive oil and add the chili flakes, pine nuts, and raisins. Saute and toss until nuts begin to toast, about 3 minutes.
Stir in the chopped chard stems to the pine nuts and raisins and cook for 2-3 more minutes. Add the chard leaves, 1 tsp. salt, and stir. Continue to cook on low heat for 2-3 more minutes until the chard leaves are soft, but not soggy.
Drain the spaghetti (retain 1/2 cup pasta cooking water) and add cooked spaghetti to chard mixture. Stir to coat the spaghetti and add a bit of the pasta water to thicken the sauce. Taste the sauce and add lemon juice a bit at a time to taste.