Designs as maximum codes in polynomial metric spaces