Notice: this answer is based on my understanding of traditional X11. It is possible that this has changed with the introduction of compositing, in which case the following is wrong, but I believe it's still correct.
No, it's not possible to record what's happening on an inactive workspace.
When a workspace is "nonactive" (not shown), the windows it contains are all unmapped. The applications aren't getting expose events and therefore they aren't actually drawing anything (If an application draws a tree in a forest that isn't displayed anywhere, does the tree really exist?).
For your use case, I recommend that you run the application inside an Xvnc server and record that. Example with auto-started session:
# Launch VNC server
vncserver -geometry 1024x768 :10
# Launch a viewer so you can see what you're doing in there
xvncviewer :10
Raw example (start Xvnc directly, no security on VNC connections):
# Start VNC server
Xvnc -geometry 1024x768 :10 &
# Launch a viewer so you can see what you're doing in there
xvncviewer :10 &
# Set your display to the VNC server
DISPLAY=:10
# Launch the desired application in there as well as the recorder
xterm & # whatever your application is
xmonad & # if you want a window manager
my-screen-recorder &