Open a file:/// url with #anchor from terminal
Don't use the open command.

Google Chrome:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "file:///Users/me/index.html#my-anchor"


Safari:

osascript -e 'tell application "Safari" to open location "file:///Users/me/index.html#my-anchor2"'