Preheat oven to 350°F and lightly grease a 9x13-inch baking dish.
Cook spaghetti per package instructions, undercooking by 1-2 minutes. Drain and set aside.
In a small bowl, mix together eggs and 1 cup of the mozzarella cheese. Toss with the drained spaghetti and pour into prepared baking dish.
Mix together tomato sauce, salt, pepper, garlic powder, onion powder, oregano, and basil and pour over spaghetti. (Or use sauce from a jar!) Sprinkle with chopped pepperoni and top with remaining mozzarella and cheddar cheese.
Bake until cheese is melted and golden brown, about 30 minutes.