Pie with cheese and ham in baking dish