Thaw the spinach and squeeze dry with paper towels. Drain the corn.
Put water in a large microwave-safe bowl. Cover and microwave 7 minutes. Using a wire whisk or fork, stir in grits, taco seasoning, and onion. Microwave, uncovered, 4 minutes. Stir and microwave 2 minutes more.
Stir in corn, spinach, margarine, and half of the cheeses.
Spray a 13x9 baking dish with cooking spray. Pour grits mixture into the dish. Sprinkle with remaining cheese.