A measurement of the underlying activity in scattering processes with a hard scale in the several GeV region is performed in proton-proton collisions at sqrt(s) = 0.9 and 7 TeV, using data collected by the CMS experiment at the LHC. The production of charged particles with pseudorapidity |eta| < 2 and transverse momentum pT > 0.5 GeV/c is studied in the azimuthal region transverse to that of the leading set of charged particles forming a track-jet. A significant growth of the average multiplicity and scalar-pT sum of the particles in the transverse region is observed with increasing pT of the leading track-jet, followed by a much slower rise above a few GeV/c. For track-jet pT larger than a few GeV/c, the activity in the transverse region is approximately doubled with a centre-of-mass energy increase from 0.9 to 7 TeV. Predictions of several QCD-inspired models as implemented in PYTHIA are compared to the data.