Place dried peas in a large stockpot and cover with several inches of cold water. Let soak, 8 hours to overnight. Drain, rinse, and return peas to the pot.
Add chicken broth, onions, and garlic to the pot. Cover, bring to a boil, and simmer until the peas have thickened, about 1 ½ hours, stirring occasionally.
Add ham and cook, uncovered, until meat is warmed through, about 15 to 20 minutes. Serve garnished with croutons, if desired.
Preheat a skillet with olive oil over medium heat.
Generously butter one side of a slice of bread. Place bread butter-side down in the hot skillet; add 1 slice of cheese.
Generously butter a second slice of bread on one side and place butter-side up on top of cheese.
Using a weight, such as a skillet, press the sandwich down. Repeat with remaining bread and cheese.
Toast sandwiches until bread is golden brown and cheese is melted, about 2 to 3 minutes per side.
