Can an HOA be held liable for failing to take enforce CC&Rs, including those prohibiting nuisance activities by residents in San Francisco or Oakland?

An HOA does have an obligation to enforce the CC and Rs. If another owner is complaining that one of the residents is causing a nuisance and makes a complaint to the HOA, then the HOA has an affirmative duty to investigate those complaints and take actions to make that resident stop their nuisance activities. If the HOA does not do that, then the complaining owner could bring an action against the HOA to force them to.