If you are found to have visited a country designated as State Sponsor of Terrorism (of which Cuba has been designated), you are no longer eligible to participate in the Visa Wavier Program and must apply for a visa to enter the United States.
The US State website – https://www.state.gov/state-sponsors-of-terrorism/ lists CUBA as a State Sponsor of Terrorism!
We advise that for the time being, you should follow the instruction and obtain a full, US visa, if you have a Cuban stamp in your passport.
The direction above is stated on both the US and the UK .gov sites.