You need to use backslash (
\
) as escape sequence for double quotes in PHP
I tested this and it works:
echo "<td><a class = 'btn btn-sm btn-danger' href='some-url.php?ID=3' onclick='return confirm(\"Are you sure to delete?\")'> Delete </a></td> \n";