Unless you are a developer, then the answer is no, and particularly no after macOS 12.3.1 where Apple has removed the Python 2.7.18 distribution which gave one access to the relevant development frameworks for manipulating PDFs programmatically from the command line.
While still using macOS 12.3, or earlier, one can "borrow" the join.py script found in the Automator Combine PDF Pages action by either linking to it, or copying it to your Desktop. From Finder, press shift+command+G and copy/paste the following path into that dialog:
/System/Library/Automator/Combine PDF Pages.action/Contents/Resources
Just drag join.py to your Desktop. It's usage is in its comments. The join.py script uses CoreGraphics frameworks and is not Python3 compatible.
Another approach that is not dependent on Python is to use osascript to run an AppleScript-Objective-C application from the Terminal that has been designed to pluck PDF document names that you provide on the command-line:
/usr/bin/osascript merge_pdf_cmd.applescript pdf1.pdf pdf2.pdf ... pdfn.pdf
and a third approach is to compile Swift source code that performs a PDF merge and then use that executable from the command line with a list of PDFs as shown above.
The last two approaches I can post here, though the former is being converted from a GUI solution to command line, and the latter requires that one has installed the Command Line Tools for Xcode which gives you the swift compiler or interpreter. The following command does not install the monster Xcode product:
xcode-select --install