Text this: Near-infrared spectroscopy of powerful compact steep-spectrum radio sources