WeWork Inc. is preparing to file for bankruptcy as soon as next week, according to people with knowledge of the matter.