Update if anyone is looking for a solution:
I confirm I now have a working solution to play Backyard Football 2-Player using two built-in joysticks.
Since lr-scummvm already recognized the first joystick as a mouse, I left player 1/joystick 1 untouched. My problem was with joystick 2; ScummVM would not recognize this as a keyboard, and thus Player 2 could not control anything.
I used xboxdrv to configure the second joystick as a keyboard when ScummVM is used. This was done by editing the runcommand-onstart file, as outlined here: https://retropie.org.uk/docs/Universal-Controller-Calibration-%26-Mapping-Using-xboxdrv/. Since Backyard Football only needs the keyboard directional keys and the right-control button, I only mapped these (joystick as the directional keys, and a cabinet button as right-control). Once ScummVM closes, this virtual keyboard gets eliminated through the use of the runcommand-onend file (again, in the doc linked above).
After doing this, a notification would appear when opening ScummVM mentioning that an X-Box Keyboard Emulator has not been configured. This was a positive sign because it shows that the virtual keyboard was being created by opening ScummVM. Unfortunately, Player 2 still was not configured to use this keyboard.
The final step was then editing the retroarch.config file for ScummVM. I first had to map Player 2 to use the new virtual keyboard, which was done by pointing to the new joystick number (2 in my case). I also had to re-do the B=right-control mapping in retroarch that was done in the runcommand-onstart file.
After doing this, Player 2's movements were being registered in ScummVM. Strangely, Player 2's movements were also moving the mouse cursor (Player 1). The final step was to tell the retroarch.config file that player 1 should not have any keyboard functionality. I did this by manually mapping each directional key and right-control to "nul" for player 1, similar to the following: input_player1_up = "nul". Now, moving joystick 1 controls player 1 (mouse), and joystick 2 controls player 2 (keyboard, via xboxdrv).