If your machine is off-line without connection to the web, then you'll be safe using an unsupported, un-patched system like Ubuntu 12.04 LTS (which has been EOL since April 2019)
If your machine is serving other machines that are connected to the web, the risk will be increased over the safety of all machines being off-line, and upgrading is for sure recommended.
Personally I used model M and model 4 processors to test flavors up to and including 19.04 cycle (Lubuntu & Xubuntu) or until the x86/i386 images were dropped (pre-release), however with 18.10 & 19.04 now EOL they should likewise be avoided.
The last release I tested was flavors of Ubuntu 18.04.5 (http://fridge.ubuntu.com/2020/08/14/ubuntu-18-04-5-lts-released/) and it's what I'd recommend.
If you're using Ubuntu 18.04.5 server, it will be supported 5 years from release (2018-April) or 2023-April (http://fridge.ubuntu.com/2020/08/14/ubuntu-18-04-5-lts-released/) and it's what I'd select.
I did have some issues with the (18.04.5 5.4; others did too) HWE kernel on 2003 pentium M models, thus I'd recommend using 18.04 LTS with the GA kernel, but none of those issues were noticed on pentium M processors used in 2005 model laptops. Myself (and I use 2x pentium M laptops) I use the GA kernel.
The upgrade path from 12.04 LTS was to 12.10 (next release) or next LTS release (14.04 which is now EOL & ESM only), so you've missed the intended upgrade path. You could try, but personally given it's out of support (14.04 being EOL & ESM only is off-topic on this and other Ubuntu sites now), I'd recommend re-install of Ubuntu 18.04 LTS (no desktop in i386, I've assumed flavor or server; if you're using a server I'd recommend a light flavor for sure)