The First Carlist War was a civil war in Spain from 1833 to 1839, fought between factions over the succession to the throne and the nature of the Spanish monarchy. It was fought between supporters of the regent, Maria Christina, acting for Isabella II of Spain, and those of the late king's brother, Carlos de Borbón (or Carlos V). The Carlists supported return to an absolute monarchy.
"Castles in Spain" means unattainable goals, and is often used to suggest the person is daydreaming. I'm not going to read Clemens' letter to determine precisely how he is using it in context. Certainly you can do that part for yourself.