Preheat the oven to 375°F.
In a large skillet, heat the olive oil over medium heat. Add the diced onion and minced garlic, sautéing until the onion is translucent, about 3-4 minutes.
Add the ground beef, cooking until browned and fully cooked, breaking it apart with a spoon, about 5-7 minutes. Drain excess fat if necessary.
Stir in the sliced zucchini, diced tomatoes, oregano, basil, salt, and pepper. Cook for an additional 5 minutes, allowing the zucchini to soften slightly. Remove from heat.
In a mixing bowl, combine the ricotta cheese, egg, and half of the mozzarella cheese. Mix until well combined.
In a greased 9x13 inch baking dish, layer half of the beef and zucchini mixture, followed by the ricotta mixture, and then the remaining beef and zucchini mixture.
Top with the remaining mozzarella cheese and sprinkle with Parmesan cheese.
Cover the dish with aluminum foil and bake for 25 minutes.
Remove the foil and bake for an additional 15 minutes, or until the cheese is bubbly and golden brown.
Let it cool for 5-10 minutes before serving.