Position oven rack at the lowest level. Preheat oven to 450 degrees F. Place shredded potatoes in cold water. Drain; add scallions, salt and pepper. Whisk in eggs and olive oil.
Coat a 10-inch pie plate or cast-iron skillet with nonstick cooking spray. Spread half of the potato mixture evenly over the bottom of the pan. Sprinkle with ham and cheese. Spread the remaining potato mixture over top, pressing evenly. Bake until the underside is golden and the potatoes are tender, about 30 minutes.
Carefully loosen edges with a thin metal spatula or a knife. Shake the pie plate or pan to be sure the potatoes are sliding freely. Invert a serving platter over the pie plate or pan. Grasp the platter and the baking dish with oven mitts and carefully turn over. Remove the pie plate or pan. Cut into wedges with a serrated knife. Serve hot or at room temperature.