In a medium sized saucepan over medium heat, combine ketchup, molasses, maple syrup, brown sugar, bacon, ham, onion, mustard and water. Bring to a simmer, then reduce heat to low and cook, stirring often, until very thick, about 2 hours.
Add the beans and simmer another 15 minutes.
Preheat the oven to 325 degrees. Then spread the cream cheese in an even layer across the bottom of a deep-dish casserole pan. Spoon the beans and sauce over the cream cheese, then top with cheddar cheese. Bake for 10 minutes, or until the cheese is melted and heated through.