SpaceX's initial public offering saw its shares close 19% higher on its first day, transforming the company into one of the world's most valuable public entities and providing a boost to shaky markets, with retail investors contributing significantly.