Preheat oven to 400°F.
In a large skillet, heat olive oil and butter over medium heat. Add sliced onions with a pinch of salt and cook, stirring occasionally, for 20–25 minutes until deeply golden and caramelized. Set aside.
Add mushrooms and cook for 8–10 minutes until browned and softened. Stir in garlic, salt, and pepper, and cook for another minute until fragrant. Set aside.
Bring a large pot of salted water to a boil. Cook pasta until just shy of al dente. Reserve ¼ cup of pasta water, then strain the pasta.
Return the strained pasta to the same pot over low heat. Add the jar of Rao’s marinara sauce and the reserved pasta water.
Add the caramelized onion and mushroom mixture directly into the pot with the pasta and sauce. Mix until everything is fully combined and coated.
Transfer to a greased baking dish. Top with shredded, sliced, and grated mozzarella, and parmesan.
Bake for 15–20 minutes, until the cheese is melted, bubbling. Broil for 2-5 minutes until cheese is golden.
Let it sit for 5 minutes, then finish with fresh basil, salt and pepper. Serve and enjoy!