Preheat oven to 350°F.
In a medium bowl, combine shredded cheddar cheese, softened cream cheese, mayonnaise, drained pimentos, minced garlic, paprika, and cayenne pepper if using.
Mix well until thoroughly combined and relatively smooth. Season with salt and black pepper to taste.
Spread mixture evenly into an 8-inch disposable aluminum foil pan.
Bake uncovered for 20 minutes, or until bubbly and golden brown on top.
Remove from oven and let cool 5 minutes before serving with crackers, bread, vegetables, or chips.