Preheat your oven to 375°F (190°C) and spray a 9x13 inch baking dish with cooking spray.
In a large skillet over medium heat, cook the ground beef until browned, breaking it up with a wooden spoon. Drain excess fat if necessary.
Add the diced onion and minced garlic to the skillet. Sauté for about 5 minutes until the onion is soft and translucent.
Stir in the marinara sauce and Italian seasoning. Season with salt and pepper to taste. Allow the sauce to simmer for 5 minutes.
In a mixing bowl, combine the ricotta cheese and half of the shredded mozzarella cheese. Set aside.
In the prepared baking dish, spread a layer of the meat sauce mixture on the bottom. Place half of the frozen ravioli over the sauce in an even layer.
Spread half of the ricotta-mozzarella mixture over the ravioli followed by another layer of meat sauce. Repeat the layers with the remaining ravioli, ricotta mixture, and meat sauce.
Top the casserole with the remaining mozzarella cheese and grated Parmesan cheese.
Cover the dish with aluminum foil and bake in the preheated oven for 25 minutes.
After 25 minutes, remove the foil and bake for an additional 5-10 minutes, or until the cheese is bubbly and golden brown.
Remove the casserole from the oven and let it cool for a few minutes. Garnish with fresh basil if desired before serving.