Preheat oven to 400°F. Place grated potatoes in a strainer and press to remove excess liquid. Set aside.
Combine chia seeds and 1/2 cup water in a small bowl. Let sit 10 minutes, stirring occasionally.
Meanwhile, combine potatoes, onion, and flour in a large bowl. Season to taste with salt, black pepper (if using), and crushed red pepper flakes (if using). Mix well. Add the chia seed mixture to the large bowl and mix well to combine.
Transfer to a 9x13 inch casserole dish. Bake, covered, 60 minutes. Remove cover and bake 30 minutes more, or until the top is crispy.