Step 1Preheat oven to 425 degrees F (220 degrees C). Grease a 9x13-inch baking dish.Step 2Bring a large pot of lightly salted water to a boil. Add spaghetti and cook for 8 to 10 minutes or until al dente; drain and rinse with cold water.Step 3Combine egg, milk, 1/2 cup of the mozzarella cheese, salt, and garlic salt in a large bowl. Stir in cooked spaghetti; mix well.Step 4Spread mixture into prepared baking dish. Bake in preheated oven for 15 minutes. Remove from oven and reduce temperature to 350 degrees F (175 degrees C).Step 5Spread sauce over spaghetti. Sprinkle with oregano, basil, and the remaining 1 1/2 cups mozzarella. Top with pepperoni, return to oven, and bake until cheese is bubbly and beginning to brown, about 30 minutes more. Let stand 5 minutes before cutting.