In a large bowl, cream butter and sugar until light and fluffy. Add eggs, one at a time, beating well after each addition. Beat in corn (mixture will appear curdled). Combine the flour, cornmeal, baking powder and salt; add to creamed mixture just until moistened. Fold in the cheeses, chilies and pimientos.
Transfer to a greased 13x9-in. baking pan. Bake at 350° for 35-40 minutes or until a toothpick inserted in the center comes out clean. Serve warm. Refrigerate leftovers.