4 oz. Parmesan, finely grated (about 1 cup), divided, plus more for serving
½ cup parsley, finely chopped (optional), plus more for serving
Freshly ground black pepper
Heat oil and butter in a large heavy pot or Dutch oven over medium until butter is melted. Add onions and garlic and cook, stirring occasionally, until very tender and deeply golden brown, about 30 minutes. (Stop before the onions become dry and shriveled.) Add red pepper flakes (if using) and 1 1/2 tsp. salt. Remove pot from heat.
Meanwhile, cook pasta in a large pot of boiling salted water, stirring occasionally, until al dente. Reserve 1 1/2 cups pasta cooking liquid.
Add pasta and 1 cup pasta cooking liquid to onion mixture and stir to combine. Add a small handful of cheese and stir until melted. Repeat with remaining cheese, adding more pasta cooking liquid as needed to create a glossy sauce that coats the pasta. Stir in parsley (if using).
Divide pasta among bowls. Top with Parmesan, parsley, and a few cranks of pepper.