The main problem here is birthrates. Despite the high birthrates seen in the the late 17th century, birthrates quickly declined to levels seen in France during the 1700s. This meant that although by 1800 their population was 3 million, by 1900 this had only grown to around 8 million. This averages out to a respectable 1% average yearly growth. This can be contrasted to Mexico, who by 1900 had a population of 20 million, and had a yearly growth rate of 2% by 1900, and Canada which had a growth rate of 3% by 1800, and by 1900 had a population of 10 million itself.
Immigration is also a key factor. Canada, in 1882, opened it's western lands to settlement through the Homestead Act, which saw any European living and working on their land for 5 years gain 100 acres to themselves. This was coupled with concentrated efforts to found this cities of Portland and Seattle in 1855, in order to better control the territory, and beginning in 1885 a mass recruitment campaign for workers from across Europe, including Italians, Poles and Jews from southern and eastern Europe, allowed these cities to grow in urban industry. The Americans only went as far as Illinois and Missouri for a reason: they simply did not have the population to control large areas of land beyond that point in any real capacity. The Canadians and British also had a far larger army and navy, while the American army was still hugely decentralised by the time Iowa, Michigan and Wisconsin(and all the lands westwards) were granted to Canada. Once we consider that the American economy was hugely dependent on cotton exports to the UK, then the US would really have no way of gaining any land past Iowa. Getting the Oregon Territory would be effectively ASB.
Meanwhile in Mexico, gold was struck in it's California province in 1845, and this saw hundreds of thousands of Europeans arrive looking for gold, including many Americans in fact, alongside an estimated 100,000 arrivals from Asia, mostly Filipinos and Chinese. Although not all found gold, the Cortez Act of 1852 did grant 50 acres to many family looking for it, mostly in northern California and Colorado. Further recruitment campaigns in the 1900s and strong industrial growth in Mexico by 1900 allowed for Mexico to soon dwarf the USA demographically. All of this means that the only possible way for the USA to gain California would be to get there before the gold rush, by 1840. Given the sheer lack of population compared to Mexico, I think that's bordering on ASB.