The way Mitt Romney and Representative Paul D. Ryan frame it, the debate over social programs that has become a dominant theme of the presidential race is all about the future of Medicare, the government health insurance program for retirees.

But the outcome of the election will probably have a more immediate and profound effect on Medicaid, the joint state-federal program that provides health care to poor and disabled people.

Few other issues present a starker difference between the Republican and Democratic tickets. President Obama, through the health care law that was a centerpiece of his domestic agenda, seeks a vast expansion of Medicaid, which currently covers more than 60 million Americans — compared with 50 million in Medicare — and costs the states and the federal government more than $400 billion a year.

To fulfill the law’s goal of near-universal coverage, the president envisions adding as many as 17 million people to the rolls by allowing everyone with incomes up to 133 percent of the poverty level to enroll, including many childless adults. While the Supreme Court ruled in June that states could opt out of the expansion, Medicaid — and federal spending on it — is still likely to grow significantly if Mr. Obama wins a second term.