Stellar contents and star formation in the NGC 7538 region