Cool, Luminous, and Highly Variable Stars in the Magellanic Clouds. II. Spectroscopic and Environmental Analysis of Thorne–Żytkow Object and Super-AGB Star Candidates