Bring a large pot of water to a rolling boil and add a generous amount of salt.
Break the 8 oz spaghetti in half, add to the boiling water, reduce heat so the pot simmers gently, and cook until al dente following package time as a guide.
While pasta cooks, remove the thick ribs from the chard, stack the leaves, slice crosswise into strips, then wash and dry the chard (salad spinner or blot with towels).
Measure or mince garlic to equal 2 tablespoons.
In a large heavy frying pan over medium heat, warm 1/4 cup olive oil, add the minced garlic and the red pepper flakes if using, and cook about 1 minute until fragrant but not browned.
Add all the chard strips to the pan and cook 1–2 minutes, stirring occasionally, until the leaves are wilted to about half their volume and coated with oil.
Remove 1/4 cup of the hot pasta cooking water from the pot and add it to the chard, then reduce the heat to low.
When the spaghetti is al dente, drain it in a colander and immediately add the hot pasta to the pan with the wilted chard; toss well using forks or tongs to combine.
Add 1/2 cup coarsely grated Parmesan or Pecorino-Romano to the pasta, toss again to distribute the cheese, and season with fresh ground black pepper to taste.
Serve hot, offering additional cheese at the table if desired.