Heat oven to 500ºF. Heat oil in a large sauté pan, and add onion, ¼ teaspoon salt, and a few pinches of pepper. Sauté over medium heat until onion softens, about 3 minutes; add garlic, and cook 1 minute more. Add chard, ¼ teaspoon salt, and a pinch of pepper; sauté over medium heat until tender, about 3 minutes. Add spinach and hot pepper flakes, and cook 1 minute more, just long enough to wilt greens. Transfer to a strainer, and cool. Squeeze out excess moisture, and coarsely chop.