We study the ultraviolet (UV) emission-line ratios of a sample of 145 type II quasars (QSO2s) from Sloan Digital Sky Survey III Baryon Oscillation Spectroscopic Survey, and compare against a grid of active galactic nucleus (AGN) photoionization models with a range in gas density, gas chemical abundances, and ionization parameter. Most of the quasars are 'carbon-loud', with CIV/HeII ratios that are unusually high for the narrow-line region, implying higher than expected gas density (>10^6^cm^-3^) and/or significantly supersolar-relative carbon abundance. We also find that solar or supersolar nitrogen abundance and metallicity are required in the majority of our sample, with potentially significant variation between objects. Compared to radio galaxies at similar redshifts (HzRGs; z>2), the QSO2s are offset to higher NV/HeII, CIV/HeII, and CIII/HeII, suggesting systematically higher gas density and/or systematically higher C and N abundances. We find no evidence for a systematic difference in the N/C abundance ratio between the two types of objects. Scatter in the NIV/CIV ratio implies a significant scatter in the N/C abundance ratio among the QSO2s and HzRGs, consistent with differences in the chemical enrichment histories between objects. Interestingly, we find that adopting secondary behaviour for both N and C alleviates the long-standing 'NIV problem'. A subset of the QSO2s and HzRGs also appear to be 'silicon-loud', with SiIII relative fluxes suggesting Si/C and Si/O are an order of magnitude above their solar values. Finally, we propose new UV-line criteria to select genuine QSO2s with low-density narrow-line regions.