Using resilient, self-sustaining plants in urban green spaces enhances environmental and cultural benefits and reduces management costs. We assessed two spontaneous plant species, Linaria vulgaris Mill. and Cichorium intybus L., in four sites from the surrounding urban areas, ranging in altitude from 78 to 1040 m. Protection against UV-B radiation is crucial for plants at higher altitudes, guiding our focus on UV-visible absorption spectra, fluorometric emission spectra, secondary metabolite accumulation, and pigment dynamics in leaves. Our findings revealed a slight increase in UV-absorbing compounds with altitude and species-specific changes in visible spectra. The UV-emission of fluorochromes decreased, while red emission increased with altitude but only in chicory. Polyphenols and flavonoids showed a slight upward trend with altitude. Divergent trends were observed in condensed tannin accumulation, with L. vulgaris decreasing and C. intybus increasing with altitude. Additionally, chicory leaves from higher altitudes (792 and 1040 m) contained significantly lower triterpene concentrations. In L. vulgaris, chlorophyll pigments and carotenoids varied with sites, contrasting with UV absorbance variations. For C. intybus, pigment variation was similar to absorbance changes in the UV and VIS range, except at the highest altitude. These observations provide valuable insights into species-specific strategies for adapting to diverse environmental contexts.