Is it advisable to play Legacy without having played Pandemic before?
Go for it and have fun!

The Pandemic Legacy rulebook covers this contingency on page 3, telling you what sections of the rules to use to play a "vanilla" Pandemic game and advises you to play that way at least twice before starting the Legacy campaign.