Dragon's a revolutionary, it makes sense to base him off an actual revolutionary. Plus, Dragon is an extremist, deciding to opt for violence to combat the World Government when he felt his previous endeavours weren't working seeing from his discussion with Vegapunk.
The morality of actual revolutionaries and extremist shouldn't really be much of a reason to criticise basing a fictional character off one. Dragon's not using peaceful means or anything to accomplish his goal, he's using violence. Perhaps Oda not showing the downside to the revolutions often enough is iffy but it makes sense to me to base an extremist on an extremist.
Plus, I mean, the situation prior to Fidel and Che, under US influence wasn't exactly amazing. Batista was unpopular and corrupt. Doesn't justify Fidel and Che but when another country is so heavily influential on your country with little concern for the livelihoods of the citizens, resistance will be pretty popular.
Overall, Fidel and Che are controversial, both liked by many (due to their resistance to US influence and overthrowing a corrupt leader and putting forth reforms that improved many people's lives, as well as by socialists and communists) whilst also detested by many due to them being extremists themselves, removing US influence especially during the Cold War and not being democratic themselves and not holding elections. So I see no issue with using controversial figures to base your fictional revolutionaries after, not like a revolutionary based on a regular politician is all that interesting of an influence.