I have already tried to port this natively, there is just not enough RAM to run it...
(BTW Undertale needs OpenGL, which is only compatible with the stock Raspbian image, not the RetroPie image)
You can see my failed attempt here: https://retropie.org.uk/forum/topic/2704/undertale-for-retropie-raspberry-pi