Bring Old Bay and 8 cups water to a boil in a 4-qt. saucepan; add shrimp, reduce heat to low, and cook until shrimp are pink, about 2 minutes. Drain and transfer to bowl of ice water to chill; drain again.
Finely grind celery seeds and allspice in a spice grinder; transfer to a bowl and stir in oil, juice, parsley, salt, chile flakes, garlic, and bay leaves. In a 1-qt. glass jar, layer shrimp and onions; pour over oil mixture. Cover with lid; chill overnight before serving.
