Melt butter in the olive oil in a large soup pot/Dutch oven over medium-high heat. Add onions, carrots and celery and cook until the onions are tender, about 7 minutes. Add garlic and red pepper flakes and sauté 30 seconds. Add ham (ham bone if using), potatoes, chicken broth, all seasonings and bay leaves. Bring to a simmer, cover, reduce heat to low, and cook for 10 minutes.
Add the canned beans and continue to cook, covered, until the potatoes are tender, about 10 additional minutes.
Meanwhile, if using a hambone, remove it from the soup and chop off any ham and add the meat back to the soup.
Discard bay leaves. Add additional broth if desired for a brothier soup. Taste and season with additional salt and pepper to taste. Top with green onions and parsley if desired.