We study normal diffusive and subdiffusive processes in a harmonic potential (Ornstein-Uhlenbeck process) on a uniformly growing/contracting domain. Our starting point is a recently derived fractional Fokker-Planck equation, which covers both the case of Brownian diffusion and the case of a subdiffusive Continuous-Time Random Walk (CTRW). We find a high sensitivity of the random walk properties to the details of the domain growth rate, which gives rise to a variety of regimes with extremely different behaviors. At the origin of this rich phenomenology is the fact that the walkers still move while they wait to jump, since they are dragged by the deterministic drift arising from the domain growth. Thus, the increasingly long waiting times associated with the ageing of the subdiffusive CTRW imply that, in the time interval between two consecutive jumps, the walkers might travel over much longer distances than in the normal diffusive case. This gives rise to seemingly counterintuitive effects. For example, on a static domain, both Brownian diffusion and subdiffusive CTRWs yield a stationary particle distribution with finite width when a harmonic potential is at play, thus indicating a confinement of the diffusing particle. However, for a sufficiently fast growing/contracting domain, this qualitative behavior breaks down, and differences between the Brownian case and the subdiffusive case are found. In the case of Brownian particles, a sufficiently fast exponential domain growth is needed to break the confinement induced by the harmonic force; in contrast, for subdiffusive particles such a breakdown may already take place for a sufficiently fast power-law domain growth. Our analytic and numerical results for both types of diffusion are fully confirmed by random walk simulations.