Preheat the oven to 375°F (190°C).
In a medium mixing bowl, combine ricotta cheese, egg, Italian seasoning, garlic powder, salt, and pepper. Mix well until smooth.
In the baking dish, spread a thin layer of marinara sauce on the bottom.
Layer half of the ravioli over the sauce. Spread half of the ricotta mixture over the ravioli, followed by a layer of mozzarella cheese. Add one-third of the remaining marinara sauce on top.
Repeat the layering process: add the remaining ravioli, the rest of the ricotta mixture, another layer of mozzarella, and half of the remaining marinara sauce.
Finish with a final layer of marinara sauce and top with the remaining mozzarella and Parmesan cheese.
Cover the baking dish with aluminum foil and bake for 30 minutes.
Remove the foil and bake for an additional 15 minutes, or until the cheese is golden and bubbly.
Remove from the oven and let it stand for 10 minutes before serving. Garnish with fresh basil if desired.