Spray a 9x13 inch baking dish with cooking spray. Cover bottom of dish with layer of potatoes. Add a layer of broccoli, then sprinkle ham evenly over broccoli. In a small bowl mix together soup, milk, dill and mayonnaise. Pour mixture evenly over ingredients in baking dish and sprinkle with cheese.