Two slightly different approaches:
RegEx [1]
^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[-+_!@#$%^&*.,?])[a-zA-Z\d][a-zA-Z\d\-+_!@#$%^&*.,?]{8,}[a-zA-Z\d]$
^ // Matches the start of the string
(?=.*[A-Z]) // Positive lookahead to cheack for presence of a uppercase letter
(?=.*[a-z]) // Positive lookahead to cheack for presence of an lowercase letter
(?=.*\d) // Positive lookahead to cheack for presence of a number
(?=.*[-+_!@#$%^&*.,?]) // Positive lookahead to cheack for presence of a special character letter
[a-zA-Z\d] // Matches a "non-special" character at the start of the string
[a-zA-Z\d\-+_!@#$%^&*.,?]{7,} // Matche any allowed character 7+ times
[a-zA-Z\d] // Makes sure the last (minimum 8th) character isn't special
$ // Matches the end of the string
RegEx [2]
^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=[a-zA-Z\d].*[-+_!@#$%^&*.,?].*[a-zA-Z\d]$)[a-zA-Z\d\-+_!@#$%^&*.,?]{8,}$
^ // Matches the start of the string
(?=.*[A-Z]) // Positive lookahead to cheack for presence of a uppercase letter
(?=.*[a-z]) // Positive lookahead to cheack for presence of an lowercase letter
(?=.*\d) // Positive lookahead to cheack for presence of a number
(?=[a-zA-Z\d].*[-+_!@#$%^&*.,?].*[a-zA-Z\d]$) // Positive lookahead to check that the string starts and ends with a letter or number but contains a special character
[a-zA-Z\d\-+_!@#$%^&*.,?]{8,} // Matches any allowed character 8+ times
$ // Matches the end of the string
Output
_Password [1] [2]
---------------------------------------
abcdef 0 => 0
abcDEF 0 => 0
abcDEF789_ 0 => 0
_123DEF789 0 => 0
abc_DEF123 1 => 1
abc_D1 0 => 0
abc%defghi 0 => 0
some pass 0 => 0
Some Other Pass_1234 0 => 0
alpha_Numeric$12 1 => 1
Random_1#@!S 1 => 1
RRARaa???23 1 => 1