Hermitian and Non-Hermitian Topology from Photon-Mediated Interactions