An offensive player who is not out-of-bounds is in-bounds.
The 'Greatest': An offensive player realises that they cannot catch the disc in-bounds and jumps from an in-bounds position, catches the disc and throws it before they land out-of-bounds.
This is a valid pass.
Rule 11.3.1. states that an airborne player who jumped from in-bounds is still in-bounds. This lasts until the player lands out-of-bounds and by that time the player has already released the disc. Therefore, the disc is not out.
A player is allowed to throw the disc while in the air, according to rule 126.96.36.199.
A player may not catch their own “greatest” throw. That is a turnover (13.2.5).
If there is a contested call regarding the catch after a “greatest”, the player who threw the “greatest” should be treated as the last thrower. They should establish a pivot at the point on the field closest to where they released the disc (or on the goal line if this would result in a pivot in their attacking end zone).
If the thrower leaves the playing field, they must establish the pivot at the spot on the playing field where they crossed the perimeter line (unless 14.2 is in effect).