I only need 8bit resolution and table gives me 234375 Hz. What will happen if I use 20000Hz ?
The PWM period will span 3000 clock cycles, rather than only 256 cycles. If the resolution of analogWrite is configured for 8 bits, which is the default, the code inside analogWrite will automatically scale your 0-255 numbers up to the 0-2999 range.
Usually this works perfectly fine. But if you're really concerned about having perfectly uniform increases in PWM steps, the downside of this scaling is some steps of 1 on the 0-255 scale will result in a step of 11 on the 0-2999 scale, but most will be a step of 12 of those 3000 clock cycles. On average, each increase of 1 on the 8 bit scale needs to translate to 11.71875 of those steps the actual hardware is using. The hardware of course is only capable of changing the PWM by integer increments of the clock it's using (on Teensy 3.6, that's F_BUS which defaults to 60 MHz).
For example, if you were to low pass filter the PWM and use it as a "poor man's DAC" (and ignoring the many other much worse issues of using PWM for a DAC) this non-uniform step size would correspond to what's commonly called
differential non-linearity in DACs. The good news is the DNL will be at most 1/11th of one LSB (performance which would be considered excellent in any real DAC) in this case, since it's scaling up by such a large ratio. (but don't let this delude you into thinking low-pass filtered PWM makes a good DAC... there are so many other problems to overwhelm this DNL non-issue)
Those particular carrier frequencies are the "ideal" for a certain number of bits because the hardware actually is running with the exact number of clocks per PWM cycle so your values passed to analogWrite are a direct 1-to-1 mapping onto the hardware, without any scaling needed.
But if precisely 20 kHz is what really matters to you, analogWriteFrequency gives you the frequency you want. But it can't magically make the clock inside the chip be 256 times that frequency. The PWM is created by timers which run at 60 MHz, so when you choose any frequency that's not the "ideal" your writes need to be scaled to the actual numerical range the hardware is really using to generate the frequency you selected.
This issue is common to digital timer PWM on all microcontrollers. Most others don't give you support software a convenient frequency function and then automatically scale the data for you, but you'd encounter the same non-ideal issue when you go to do the scaling. It's just fundamentally how discrete time digital hardware creates PWM.