Naomi Osaka suffered a shock exit at the hands of Jessica Pegula in the second round of the Italian Open.