Place a steamer insert into a saucepan and fill with water to just below the bottom of the steamer. Bring water to a boil. Add cauliflower, cover, and steam until tender, about 20 minutes. Transfer cauliflower to a large bowl. Add mashed potato flakes, milk, and margarine; mash with a potato masher or fork until cauliflower mixture is fluffy. Season with salt and black pepper. Pour mixture into a baking dish and sprinkle with Cheddar cheese.
Bake in preheated oven until cheese is melted, about 10 minutes.