Coarsely grate potatoes and onion into a colander in the sink. Squeeze out as much liquid as possible, then transfer vegetables to a large bowl; mix in egg, flour, 1 teaspoon salt, and 1/4 teaspoon pepper.
Heat oil in a large nonstick skillet over medium. Working in batches, drop 1/4-cup mounds of potato mixture into the skillet; press lightly with a spatula to flatten. Cook pancakes until golden, 5 to 6 minutes per side.