Boundedness for codimension two subvarieties in quadrics