Shuck the corn, remove the silk, and cut off the stem so the cob has a flat surface. Stand each ear up on a cutting board and scrape off the kernels with a chef's knife; transfer the kernels to a large bowl as you work.
Put the corncobs and 6 cups water in a large pot over medium-high heat. Sprinkle with salt and pepper. Bring to a boil, then lower the heat so the water bubbles gently. Cover and cook until the liquid is quite cloudy, about 30 minutes; discard the corncobs.
Put the olive oil in a large skillet on medium heat. When the oil is hot, add the scallions and green chiles and cook until scallions are soft, about 3 minutes. Add the cornmeal and cook for another 2 or 3 minutes, stirring as needed.
Add the cornmeal mixture, corn kernels, and potatoes to broth and cook until potatoes are soft, about 20 minutes. Stir in the heavy cream, if you're using it, and serve.