The verdict
Same joint action, same level, both isolation pulls at beginner level. Both work through elbow flexion and list the biceps as a primary muscle. The hammer curl adds the brachialis as a second primary muscle, with the forearms as secondary, and its neutral grip puts more of the work on the brachialis and the forearm. The EZ-bar curl lists the biceps alone as primary, with the forearms secondary, and curls a bent bar with a grip that is easier on the wrists than a straight bar. The hammer curl is the dumbbell curl you can do one arm at a time; the EZ-bar curl is the two-arm bar curl that loads in small steps. Most arm days want one of them, not both.
Muscles, equipment, force and level from the PasteLift exercise library records for the hammer curl and the ez-bar curl. Sets and reps from the ACSM position stand, cited below.