1. In a 10-inch skillet, heat the oil over medium heat. Add the onion and cook, stirring, until it is soft and translucent, about 5-8 minutes. Add the pancetta or prosciutto, and cook briefly, stirring, until it releases its flavor, about 5-8 minutes. Add the wine and let evaporate. Stir in the tomato paste, tomatoes, pepper, and red pepper flakes. Bring to a boil over medium heat, reduce the heat to low, and simmer about 15-20 minutes.
2. Meanwhile, cook the pasta in boiling, salted water according to the package directions. Drain and dress with the sauce. Serve with the grated cheese separately.