Cook pasta according to package directions. Drain. Preheat the oven to 350 degrees F (175 degrees C).
In a large saucepan, heat oil over moderately high heat. Add onion and garlic; cook 2 to 3 minutes, stirring constantly, until onion is translucent. Stir in crushed tomatoes, tomato paste, basil, and salt. Bring to a boil, then reduce heat to medium-low. Simmer, covered, for 20 minutes.
In a medium bowl, blend together ricotta, mozzarella, egg, black pepper, and nutmeg.
Cover the bottom of a 2 1/2 quart baking dish with about 1 cup of the tomato sauce. Layer with half of the ziti, half of the cheese mixture, 2 more cups of the tomato sauce, and remaining ziti. Top with remaining cheese mixture and sauce.
Bake in the preheated oven for 20 to 25 minutes, until sauce is bubbly and cheese is melted.