  The composition of a planet's atmosphere is determined by its formation,
evolution, and present-day insolation. A planet's spectrum therefore may hold
clues on its origins. We present a "chain" of models, linking the formation of
a planet to its observable present-day spectrum. The chain links include (1)
the planet's formation and migration, (2) its long-term thermodynamic
evolution, (3) a variety of disk chemistry models, (4) a non-gray atmospheric
model, and (5) a radiometric model to obtain simulated spectroscopic
observations with JWST and ARIEL. In our standard chemistry model the inner
disk is depleted in refractory carbon as in the Solar System and in white
dwarfs polluted by extrasolar planetesimals. Our main findings are: (1)
Envelope enrichment by planetesimal impacts during formation dominates the
final planetary atmospheric composition of hot Jupiters. We investigate two,
under this finding, prototypical formation pathways: a formation inside or
outside the water iceline, called "dry" and "wet" planets, respectively. (2)
Both the "dry" and "wet" planets are oxygen-rich (C/O<1) due to the oxygen-rich
nature of the solid building blocks. The "dry" planet's C/O ratio is <0.2 for
standard carbon depletion, while the "wet" planet has typical C/O values
between 0.1 and 0.5 depending mainly on the clathrate formation efficiency.
Only non-standard disk chemistries without carbon depletion lead to carbon-rich
C/O ratios >1 for the "dry" planet. (3) While we consistently find C/O ratios
<1, they still vary significantly. To link a formation history to a specific
C/O, a better understanding of the disk chemistry is thus needed.
