How to recover missing keyboard shortcuts on iOS
I experienced the exact same problem with iOS 11 on an iPhone 7. I found the solution in a different Apple Discussions thread for people who had experienced a similar problem after iOS 10 on an iPhone 6/6s. But it also works for iOS 11 & iPhone 7 as well.
Here’s how to fix it (I don’t know if each step is necessary, but I followed it step-by-step and it worked perfectly for me):
Go into Settings > General > Keyboard > Text Replacement
There shouldn’t be any text replacement shortcuts listed
Go back to Keyboard (I had all of the auto-switches for Auto-Capitalization, Auto-Correction, Check Spelling, etc. enabled)
Turn off Auto-Capitalization, Auto-Correction and "." Shortcut
Immediately turn off** your phone without leaving the page (**to clarify: turn your phone off does not mean reset your phone; you have actually manually turn off your phone off the right way)
Wait a minute or so before turning it back on
Open up Settings > General > Keyboard
Turn back on all the switches that you turned off in step 4
Wait a minute or so, and then go into Text Replacement, and all your previously saved ones should be there again
I did this and got all of my ~200 text replacements back!IOS