1. Bring a pot of generously salted water to a boil. Add pasta; cook, stirring occasionally, until pasta is tender to the bite. Drain pasta, reserving 2 cups cooking water.
2. Meanwhile, melt butter in a large pan over medium-high heat. Add garlic and mushrooms and cook, stirring, until mushrooms just begin to brown, about 2 minutes. Add corn and chiles and cook until chiles begin to soften, 2 to 3 minutes. Season with salt and pepper.
3. Add pasta and 1 1/2 cups reserved cooking water to corn mixture and toss until liquid is absorbed. Shut off heat. Coarsely crumble feta over pasta and toss, adding more cooking water if necessary to make a very thin sauce.