Three people have been taken to hospital, and dozens of others were evacuated from a unit in Sydney’s eastern suburbs after it caught alight.