As long as you have a GPU, you can use Ogre (i.e. not rely on software only; you can use a dedicated GPU or the integrated one). However please take in mind several OSes (including Linux and Windows) give a lot of headaches when working in headless mode (no monitors plugged in). A common cheap solution to that problem is one of those fit-Headless
plugs selling on Amazon.
It may be possible to avoid the fit-Headless plug, but it's going to require some tiresome work to get it running. You will also have to sort out the EGL / GLX madness. Chances are you're going to require an active X11 server. I don't know if it's possible to render without an X11 server.
Another problem you will face is that Ogre (and 3D APIs) usually requires some "head start" when initializing. It's quite possible launching the process and initializing all required resources is going to occupy most of your 500ms range (if not more); not to mention shader compilations.
The best solution I would see is to keep the process as a daemon, and your command line be a process that communicates with that daemon (e.g. via pipe or tcp) to perform the rendering. If you do that, then rendering in 500ms is perfectly plausible and time taken will depend on your scene complexity and GPU speed (number of vertices is a factor, but not the only one). 500ms looks like a lot of time for just rendering so it should be fine.
Then saving to JPEG is going to have to be done in CPU code, and how long that takes depends on the jpeg lib you use, the compression quality, and the CPU speed. Then saving to disk depends on whether you need the disk transfer to be async (the usual way, fast) or sync (slow, depends directly on the I/O hardware speed i.e. SSD vs HDD, and what other processes are doing with I/O).
Is Ogre capable of doing what you want? Yes.
Do you need to take certain precautions? Yes.