A different mentality in the US Administration and Congress is everything that matters for this PoD. Mexico was crushed and helpless at the end of the war, it was forced to do whatever Washington would choose to do. You need a different US mentality, one more geared to continental expansionism and one less minded of racist concerns about eventually giving US citizenship to large numbers of indio and mestizo Mexicans.
There was a "All of Mexico" movement in the USA that wanted to annex the whole Mexico or all of the Northern Mexican territories, but was defeated because the anti-slavery party did not want to give the slaveholders even more territory to expand into (a false concern since the Mexicans tehmselves were anti-slavery and with the combined effort of them and freesoiler settlers, any attempt to introduce slavery into Northern Mexico would have turned out like Bleeding Kansas writ large) and the slaveholders themselves were half-hearted about it because of the racist concerns above.
This is a very feasible PoD, you just need to up the expansionism quotient in the US public just a bit. The most plausible way is to use one of my most preferred PoD ever, a US that is consistently highly expansionistic all of their history, because they get Canada in the ARW.
1774. The British Parliament does not give religious liberty to Catholic Franco-Canadians. Patriot unrest spreads like wildfire to Quebec.
1775-1781. With the help of Patriotic Quebecois, the Continental Army is able to dislodge the Redcoats from Quebec and Nova Scotia.
1783. The peace deal gives the 16 Confederated Colonies complete control of formerly British North America. A strong expansionist-irredentist felling remains in the US public about bringing the British West Indies (and eventually, all the Americas) in the fold of the new Republican experiment.
1787. The Constitution, as usual. Because of the even more successful course of the ARW, the Federalists stays in power longer and build an effiicent US Army and Navy.
1798-99. The emboldened USA takes offense at the attitude of Revolutionary France in the XYZ Affair and declares war, seizing the French Caribbean.
1803. A Napoleon engrossed with European war sees the futility of amintining a foothold on North America and sells Louisiana.
1812-1814. An even more emboldened USA takes offense at the attitude of Britain about blockade and impressment and declares war, seizing the British West Indies. The British are focusing most of their energies in the Napoleonic wars at the time, so they give up the northern half of the Americas as a lost cause.
1820s. Thanks to the string of successful wars and territorial expansions, a strong bi-continental expansionist feeling becomes an integral part of the American public's mainstream political feeling, the idea that all of the Americas must eventually become a part of the Great Experiment. When the Spanish colonies begin their own wars of independence, there is widespread sympathy for their cause. In pasticular, when Latin American patriot leader Simon Bolivar escapes to the US after a defeat, the US government and private subscriptions shower him with abundant funds for his cause and he returns to the fight in Northern South America with a large amry of US volunteers, even if the USA shuns from an official declaration of war.
As a counterbalance, the UK give similar financial and covert militar support to rival patriot leader San Martin. Bolivar ultimately establishes control over the viceroyalty of New Granada, which he reonganizes as the republic of Gran Colombia in the US Sphere of influence, San Martin over the viceroyalty of Rio de la Plata in the British Sphere of Influence, the territories of the viceroyalty of Peru remain as an uneasy contested buffer zone between the two Great Powers and their proxies. Bolivar, thanks to strong US help during the war of independence, takes a strong sympathy to the US system of government, and is able to negotiate the admission of Gran Colombia in the USA.
The USA are less successful to expand their influence in fledging Mexico, mostly due to enchroaching US settlers into Northern Mexico. A growing rivalry builds up.
1835-1840. During one of the many recurring Mexican internal upheavels, the secessionist republics of Texas, Rio Grande, and Yucatan break up from Mexico and with extensive US are able to affirm their independence. They plead for admission to the USA, and their plead is eventually successful in 1845. This arouses nasty border disputes with Mexico, and fans lingering resentment over support for the secessionist republics, which break out into full-fledged war. The US Army easily trounces Mexico, and in the peace settlement the US Administrration and Congress decide to stretch the current Eastern border, roughly on the 22° Parallel, all the way to the Pacific, and to incorporate all of Northern Mexico.