Boil pasta according to package instructions. Undercook the pasta by a minute or two if you want to bake this recipe after. Rinse pasta with cold water and set aside in a large mixing bowl.
To make the onions, set a small frying pan over medium heat. Add oil and the diced onion. Cook, without stirring for about 5 minutes. Add a small splash of water and stir the onion, scraping up the brown bits from the bottom of the pan. Continue cooking and then adding water for 15 minutes or so, or until the onion is soft and browned. Set aside.
Microwave the corn and chop the jalapenos and set aside.
Heat a saucepan over medium heat. Melt the butter and then add the flour. Whisk and cook for about a minute, until the mixture is a golden brown paste and you see no raw flour remaining. Slowly add the milk, while whisking, until fully incorporated.
Add the mustard and slowly add the cheese while whisking, until the cheese has melted and the sauce is smooth. Taste and season with salt and pepper. (I usually boil the pasta, fry the onions and make the cheese sauce at the same time.)
To the mixing bowl of pasta, add the corn, jalapenos, onions, and cheese sauce. Mix and serve.
Alternatively, you can pour everything into a casserole dish and scatter some more cheese on top (even breadcrumbs) and bake at 350°F until hot and bubbly and the toppings have browned about 20 to 30 minutes.