We model a 21 cm intensity mapping survey in the redshift range 0.01<z<1.5 designed to simulate the skies as seen by future radio telescopes such as the Square Kilometre Array (SKA), including instrumental noise and Galactic foregrounds. In our pipeline, we remove the introduced Galactic foregrounds with a fast independent component analysis (fastica) technique. We present the power spectrum of the large-scale matter distribution, C(l), before and after the application of this foreground removal method and calculate the resulting systematic errors. We attempt to reduce systematics in the foreground subtraction by optimally masking the maps to remove high foregrounds in the Galactic plane. Our simulations show a certain level of bias remains in the power spectrum at all scales l<400. At large-scales l<30 this bias is particularly significant. We measure the impact of these systematic effects in two different ways: firstly we fit cosmological parameters to the broadband shape of the power spectrum and secondly we extract the position of the Baryon Acoustic Oscillations (BAO). In the first analysis, we find that the systematics introduce an significant shift in the best fit cosmological parameters at the 2 to 3 sigma level which depends on the masking and noise levels. However, cosmic distances can be recovered in an unbiased way after foreground removal at all simulated redshifts by fitting the BAOs in the power spectrum. We conclude that further advances in foreground removal are needed in order to recover unbiased information from the broadband shape of the power spectrum, however, intensity mapping experiments will be a powerful tool for mapping cosmic distances across a wide redshift range.