build castles in the air = build castles in in Spain
have a visionary and unattainable scheme - daydream
The concept was known to St. Augustine (354-430) who uses the phrase subtracto fundamento in aere aedificare meaning build on air without foundation. Castles in the air has been the version predominant in English since the late 16th century, but castles in Spain, from Old French châteaux en Espagne, was used in the late medieval period and occasionally in more recent times. The form of the saying in Old French, known from the 13th century, may refer to the fact that much of Spain in the Middle Ages was under Moorish control, so any scheme to build castles there was clearly unlikely to succeed.