1Heat the oven to 400°F and arrange a rack in the middle. Pierce the potatoes all over with the tip of a paring knife and place directly onto the oven rack. Bake until barely tender when pricked with the point of a small knife, about 45 minutes to 1 hour. Let the potatoes cool to room temperature, then chill in the refrigerator for at least 2 hours, preferably overnight.
2Warm 1 tablespoon of the olive oil in a large, nonstick, ovenproof frying pan over medium heat. Fry the onion, stirring occasionally, until it’s lightly browned and tender, about 10 minutes. Stir in the salt, paprika, sugar, onion powder, and garlic powder. Scrape the onion into a large bowl.
3Peel the potatoes and shred them on the large holes of a box grater into the bowl with the onions. Toss the shredded potatoes with the onion mixture until well combined.
4Warm the frying pan over medium heat and add 2 tablespoons of the oil. When it’s hot, add the potato mixture. Using a spatula, quickly spread the mixture into an even, thick layer, then press down firmly on it to form a cake.
5Cook, pressing down occasionally with the spatula, until the bottom is crisp and golden brown, about 10 minutes.
6Set a large plate upside down over the top of the potato cake. Quickly (but carefully) invert the potatoes onto the plate. Add the remaining 1 tablespoon of oil to the pan and, using the spatula as a guide, slide the potatoes back into the pan so that the cooked side is on top. Cook, pressing down occasionally with the spatula, until the bottom is crisp and golden brown, about 10 minutes. Heat the broiler and arrange a rack about 6 inches from the heat.
7Carefully invert the potato cake onto a baking sheet. Sprinkle the top with the cheese and slide it under the broiler. Broil until the cheese is melted and lightly browned, about 2 minutes. Sprinkle with the green onions, cut into wedges, and serve.