In a large cast-iron pan over high heat, add 3 tablespoons of the olive oil and heat until hot but not smoking. Add the mushrooms and stir to coat them in oil. Reduce the heat to medium high and sauté, stirring very minimally, until the mushrooms are a deep golden brown and crispy on the edges, 6 to 8 minutes. Transfer to a sheet tray in a single layer and set aside.
Return the pan to medium-high heat and add the remaining 2 tablespoons of olive oil. Add the onions and sauté until soft and beginning to turn golden brown on the edges, about 3 minutes. Add the corn kernels and cook, stirring once, 30 seconds. Add the cooked rice, salt and pepper, and stir until the rice is hot, about 2 minutes. Stir in the mushrooms and remove from the heat. Sprinkle with flaky salt and serve immediately. Makes 6½ cups.