We study the processes $\gamma \gamma \to \eta_c \to \eta' K^+ K^-$, $\eta' \pi^+ \pi^-$, and $\eta \pi^+ \pi^-$ using a data sample of 519 $fb^{-1}$ recorded with the BaBar detector operating at the SLAC PEP-II asymmetric-energy $e^+e^-$ collider at center-of-mass energies at and near the $\Upsilon(nS)$ ($n = 2,3,4$) resonances. This is the first observation of the decay $\eta_c \to \eta' K^+ K^-$ and we measure the branching fraction $\Gamma(\eta_c \to \eta' K^+ K^-)/(\Gamma(\eta_c \to \eta' \pi^+ \pi^-)=0.644\pm 0.039_{\rm stat}\pm 0.032_{\rm sys}$. Significant interference is observed between $\gamma \gamma \to \eta_c\to \eta \pi^+ \pi^-$ and the non-resonant two-photon process $\gamma \gamma \to \eta \pi^+ \pi^-$. A Dalitz plot analysis is performed of $\eta_c$ decays to $\eta' K^+ K^-$, $\eta' \pi^+ \pi^-$, and $\eta \pi^+ \pi^-$. Combined with our previous analysis of $\eta_c \to K \bar K \pi$, we measure the $K^*_0(1430)$ parameters and the ratio between its $\eta' K$ and $\pi K$ couplings. The decay $\eta_c \to \eta' \pi^+ \pi^-$ is dominated by the $f_0(2100)$ resonance, also observed in $J/\psi$ radiative decays. A new $a_0(1700) \to \eta \pi$ resonance is observed in the $\eta_c \to \eta \pi^+ \pi^-$ channel. We also compare $\eta_c$ decays to $\eta$ and $\eta'$ final states in association with scalar mesons as they relate to the identification of the scalar glueball.