Preheat oven to 400 degrees F (200 degrees C). Lightly grease a large baking dish.
Mix spinach, cottage cheese, eggs, nutmeg and cayenne pepper in a large bowl. Stir flour into Cheddar cheese and Swiss cheese in another bowl until cheeses are coated; add cheese mixture to spinach mixture.
Pour mixture into prepared baking dish.
Bake in the preheated oven until the center of the spinach mixture does not wiggle, 25 to 30 minutes.