Simulation of topological superconductors and their competing orders using photon-mediated interactions