Preheat the oven to 375°F (190°C) and lightly grease a 9x13 baking dish with non-stick spray.
In a large skillet over medium heat, brown the ground Italian sausage with the diced onion, breaking up the meat, until the sausage is no longer pink and the onion is softened, about 6–8 minutes.
Add the minced garlic to the skillet and cook for 1–2 minutes until fragrant, then stir in the pasta sauce, Italian seasoning, dried basil, and red pepper flakes; bring to a simmer and remove from heat.
Spread 1 1/2 cups of the sauce mixture evenly over the bottom of the prepared baking dish.
Arrange half of the ravioli in a single layer over the sauce, then spoon 1 1/2 cups of sauce over the ravioli, sprinkle with 1 1/2 cups of shredded mozzarella and 1/8 cup grated Parmesan.
Top with the remaining ravioli, spread the remaining sauce evenly over them, and sprinkle with the remaining mozzarella and Parmesan.
Cover the dish tightly with aluminum foil and bake for 30 minutes.
Remove the foil and bake uncovered for an additional 25 minutes, until heated through and the cheese is bubbly and lightly golden.
Let the lasagna rest for 5–10 minutes before slicing and serving.