Rinse, pick over, and place peas in a large bowl. Cover with several inches of cool water; let stand 8 hours to overnight. Drain and rinse.
Pour water into a large saucepan or stockpot. Add bouillon cubes and bring to a boil, stirring occasionally to dissolve bouillon. Stir in peas; reduce heat and bring to a simmer.
Place bacon in a large, deep skillet and cook over medium-high heat, turning occasionally, until evenly browned, about 10 minutes. Drain bacon slices on a paper towel-lined plate. Crumble bacon and set aside.
Melt butter in the pan with bacon grease; cook and stir onions until they begin to turn brown at the edges, about 10 minutes.
Stir onions and cooking fat into peas; add crumbled bacon, ham, salt, and pepper to taste. Simmer over low heat for 8 hours, stirring every hour.