As others noted, it is correct. As a matter of style, it's better to use parallel structures, i. e., "to live is to exist.. " or "living is existing... "
The infinitive has a stronger verbal sense. "To be or not to be, that is the question" is great writing. "It's a question of being or not being" means the same thing but doesn't have the punch.