Heat oil in a large skillet over medium heat. Add garlic and red-pepper flakes; cook until tender, about 1 minute. Add collard greens and cook, stirring, until tender, about 5 minutes. Remove from heat; stir in pine nuts and lemon zest and juice. Season with salt. Meanwhile, cook spaghetti in a pot of boiling salted water until al dente, according to package instructions. Reserve 1 cup pasta water; drain pasta. Add pasta and reserved water to skillet, tossing to coat. Serve immediately, garnished with lemon zest and sprinkled with cheese.