Preheat the oven to 350 degrees F (175 degrees C). Grease a casserole dish.
Combine cream cheese and butter in a microwave-safe bowl. Microwave on high until melted, 1 to 2 minutes.
Pour cream cheese mixture into a large skillet; add milk and flour. Cook, stirring occasionally, over medium heat until mixture thickens, 3 to 5 minutes.
Combine corn and jalapeño peppers in a bowl; add to cream cheese sauce. Season with salt and mix well. Pour into the prepared casserole dish.
Bake in the preheated oven until lightly browned, about 30 minutes.