Preheat the oven to 375°F.
Cook the penne pasta until al dente, about 8-10 minutes, then drain.
In a large skillet, sauté the ground beef over medium heat until browned, about 5-7 minutes.
Add the diced onion and minced garlic to the skillet, cooking until the onion is translucent, about 3-5 minutes.
Stir in the crushed tomatoes, oregano, salt, and pepper, and simmer for 10 minutes.
Mix the cooked pasta with the meat sauce in the skillet, ensuring even distribution.
In a greased baking dish, layer half of the pasta mixture, then dollop half of the ricotta cheese on top, followed by half of the mozzarella.
Repeat the layering with the remaining pasta, ricotta, and mozzarella.
Cover the baking dish with foil and bake for 25 minutes.
Remove the foil and bake for an additional 15-20 minutes until the top is golden and bubbly.