Bring 4 cups of water to a rolling boil in a medium pot.
Add 1/2 teaspoon kosher salt and 1/2 pound whole-wheat spaghetti to the boiling water. Cook uncovered until pasta is tender or al dente, about 8–10 minutes or according to package directions.
Before draining, scoop out and reserve 1/2 cup of the pasta cooking water. Drain the pasta and set it aside.
While the pasta cooks, heat 2 tablespoons olive oil in a large skillet over medium heat until the oil shimmers.
Add the small diced onion and the 3 sliced garlic cloves to the skillet. Cook, stirring frequently, until the onion begins to soften and the garlic is fragrant, about 3–4 minutes.
Add the large diced beefsteak tomato, 2 cups fresh spinach leaves, and 1/4 teaspoon ground black pepper to the skillet. Reduce heat to medium-low, stir to combine, cover, and cook until the spinach is wilted and the tomato softens, about 3–5 minutes.
Add the drained pasta and the reserved 1/2 cup pasta water to the skillet. Increase heat to medium and toss or stir until the pasta is heated through and the liquid coats the pasta, about 1–2 minutes.
Remove from heat and divide onto plates. Sprinkle 1/2 cup fat-free crumbled feta over each serving immediately before serving. Serve hot, warm, or cold.