Can't write to ~/Library, even though permissions look OK
To see the rest of the permissions (ACLs and file flags), add -e and -O to the ls command. I habitually use ls -leO@ as a "tell me everything" version of ls.

In this case, the problem was a "deny" access control entry, which will override the regular POSIX permissions. I have no idea how that might've gotten added to your ~/Library folder, but you can remove it with chmod -N ~/Library.

It's a bit late, but I would not have recommended using -R (apply recursively to all contents) on that chmod command, since there are some items inside ~/Library that are supposed to have ACLs (mostly to prevent accidental renaming or deletion of important items). But I don't think removing everything will to any actual harm, and if you're worried about other spurious ACLs, the recursive reset makes sense.