ActiveRecord loads metadata (table information) when the first query is executed for a table. When you start your application with a query to shard_A, it checks the table structure, and constructs your Image class according to it, with submission_fk.
When you change shards, it won't check the table structure again, so it assumes that there is a submission_fk, and assumes no sub_fk, since it doesn't know about that.
I suggest you to use the same structure for all shards, but if you can't do that, you may force ActiveRecord to reload the table information - I never used Octopus, but I think it will work:
Image.reset_column_information
Note that it will degrade the performance of the application, since reloading the metadata is a slow operation.