Heat the oil in a medium skillet over medium heat. Add the onion and cook, turning once, for 5 minutes or until lightly browned. Place in the bottom of the baking pan. Add the garlic to the same skillet and cook for one minute. Add the crushed tomatoes, basil, and oregano. Reduce the heat to medium-low and simmer for ten minutes.
Spread about one-third of the tomato mixture over the onion layer. Arrange one-third of the eggplant over the tomatoes and top with one-third of the sliced tomato. Top with one-third of the riccota and the mozzarella. Repeat the layers two times. Cover with aluminum foil.
Bake for 25 minutes, or until the vegetables are tender. Uncover and bake for ten to fifteen minutes longer, or until the cheese is lightly browned.