SpaceX and OpenAI are preparing for blockbuster IPOs, but history says buying the stocks immediately is a risky move.