Spectral properties of adsorbates on metal surfaces via the embedding method