It turned out I was barking up the wrong tree on this one. I was trying to get the verticies of the terrain and make a collider based on that. I then realized that an ITerrainSceneNode created with a 1024x1024 heightmap contains 1048576 verticies which is probably way too many. I then used reactphysics3d's heightmap collider to make a collider based on the procedurally generated heightmap.
This mostly worked. After some fenangling I got the 0 height value and the 255 height value to match on both the irrlicht terrain and the reactphysics3d collider. I seem to need to multiply the ITerrainSceneNode scale on the x and z axis by 1.0148809 to make it be the exact same size as the reactphysics3d heightmap collider that is created with supposedly the same size.
The most notable weird thing is that certain height values between 0 and 255 still don't match and are off by an altitude of up to half a meter. It doesn't seem to be related to the scaling since the highest and lowest heights always match. I think it has something to do with either irrlicht terrain smoothing or integer rounding in the code I made for it. There are a lot of things I could try to try and fix this problem so if I find something postworthy while doing this I'll post about it
The ITerrainScene node is pretty great and I think this is going to work, I'm glad I didn't have to make one myself. The only 2 "issues" are that the terrain doesn't follow parent nodes if you try to put it in a parent node and also it lags a lot if I try to rotate or move the terrain node. For me, this just means the outside environment (stars, planets, etc) will have to rotate around the terrain to get a day/night cycle.