Cook the ziti pasta according to the package instructions until it's al dente. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the chopped onions and garlic, and saut until they become translucent and fragrant.
Add the ground beef to the skillet, breaking it into small pieces with a spoon or spatula. Cook until the meat is browned and no longer pink. Drain any excess fat if necessary.
Stir in the crushed tomatoes, tomato paste, dried oregano, dried basil, salt, and pepper. Reduce the heat to low, and let the sauce simmer for about 15-20 minutes, allowing the flavors to meld and the sauce to thicken.
Preheat your oven to 375F (190C).
In a large mixing bowl, combine the cooked ziti pasta and the Bolognese sauce. Mix thoroughly to ensure the pasta is evenly coated with the sauce.
Transfer half of the pasta and sauce mixture to a baking dish. Sprinkle half of the mozzarella and Parmesan cheese over the pasta. Add the remaining pasta and sauce, and top with the remaining cheese.
Place the baking dish in the preheated oven and bake for about 15-20 minutes, or until the cheese is melted and bubbly, and the edges are golden brown.
Remove the dish from the oven and let it cool slightly before serving. Garnish with fresh basil leaves if desired.