Preheat oven to 375 degrees F.
Heat some olive oil over a large oven-proof skillet over medium heat. Add the onions and cook for about 3-4 minutes until softened, stirring occasionally. Add the minced garlic and cook until fragrant, stirring, about 1-2 more minutes. Season with salt and pepper if needed.
Add the marinara and warm it up a little bit. Make 4 wells, and break an egg into each well. Tip: crack eggs into a bowl, one at a time, and then add them to the skillet to prevent accidental egg shells.
Add a few dollops of ricotta, gently pushing it down into the sauce. Top with shredded parmesan and mozzarella cheeses.
Bake in the oven for about 12-15 minutes or until eggs are set to taste. Serve with basil or parsley as garnish, and toasted bread.