Forces between interfaces in concentrated nanoparticle suspensions and polyelectrolyte solutions