First, Apple is no longer supporting H.264 in a QuickTime wrapper, it is a buggy and you should never use it. Limitation is not in the media encoder and it did not come from Adobe, blame this one on Apple.
Second, all mpeg compression is based on square blocks of pixels. Frame sizes are set by the codec and there is not much you can do to change that. You must choose legal frame sizes on the codec you are using.
Wikipedia has an H.264 page that you should look up. I'll be media coder will only render legal Frame sizes and frame rates. Your biggest problem is not understanding compression technology and trying to use a no longer supported and always buggy QuickTime H.264 format.
To get the best quality compression with the fewest color artifacts and best motion calculation you need to match the standard frame sizes. Media players are also aware of these limitations and if you send them odd sizes they may resize the video lowering the quality.
lol.. its not buggy... and thats not even what I am talking about... go troll somewhere else
Show me a current recommendation from anyone that is in the business of creating video the you should use Quicktime H.264. Find me documentation from the folks that designed and built the H.264 format that says you should not worry about the frame size restrictions or that the codec is not based on blocks of pixels that should follow the standard. Find me documentation from Apple that they are actively developing h.265 as a compression format. I'm curious where these references are because I have been making my living making film and video for a very long time and I plan to continue for many more years. I want to know where to find the best information.