Preheat the oven to 350 degrees F (175 degrees C). Spray a 9x13-inch baking dish with cooking spray.
Bring a large pot of lightly salted water to a boil. Cook elbow macaroni in the boiling water, stirring occasionally, until cooked through but firm to the bite, 8 minutes; drain.
Reserve 1/2 cup shredded mild Cheddar cheese; set aside.
Mix together remaining mild Cheddar cheese, sharp Cheddar cheese, sour cream, cottage cheese, and egg in a bowl; season with salt and pepper. Stir cooked macaroni into cheese mixture. Pour macaroni mixture into the prepared baking dish; sprinkle with reserved 1/2 cup mild Cheddar cheese.
Bake in the preheated oven until cheese is melted and bubbling, about 40 minutes. Let cool for 10 minutes before serving.