Effective theory of freeze-in dark matter