Preheat the oven to 400°F. Spray the inside of an 8x8-inch casserole dish with nonstick spray. Line a baking tray with foil (bake the casserole on top of this to catch any drips as it cooks).
Add the ground beef to a large skillet over high heat. Cook until browned, about 5 to 7 minutes, stirring occasionally, and using a wooden spoon to break up the meat. Turn off the heat and stir in the marinara.
Spread ⅓ of the meat sauce on the bottom of the prepared casserole dish. Layer ½ of the still-frozen ravioli on top of the sauce. Spread ⅓ of the meat sauce on top of the ravioli. Spread ½ of the mozzarella, and then ½ of the parmesan on top of the meat sauce. Layer the remaining ½ of the still-frozen ravioli on top of the sauce. Spread the remaining ⅓ of the meat sauce on top of the ravioli. Spread the remaining ½ of the mozzarella, and then the remaining ½ of the parmesan on top of the meat sauce.
Cover the casserole with foil. Place the casserole dish onto the lined baking tray, and bake for 40 minutes. Uncover the casserole and bake until the cheese on top starts to turn golden in spots, about 15 minutes. Let it cool for 10 minutes, and then sprinkle fresh basil on top to serve.