I actually found the answer myself by looking at the source of the vscode-pdf extension: Their implementation of the vscode.CustomReadonlyEditorProvider interface defines viewType = 'pdf.preview' in this source file.
I changed my code to:
vscode.commands.executeCommand(
'vscode.openWith',
uri_pointing_to_my_pdf_file,
'pdf.preview', // use correct editor provider name here: "pdf.preview"
vscode.ViewColumn.Beside
)
This appears to be the correct way to use the 'vscode.openWith' command when opening a PDF.