When I use the metafieldsSet mutation graphQL API to create a new metafield to the MediaImage resource, the result is success and the metafield is created.
It looks like you are requesting metafields from the preview image not the image you created the metafield on. If you move the metafields request up a level it should work.
Something like:
query {
node(id:"gid://shopify/MediaImage/30888677212358") {
... on MediaImage {
shopifyUrl
metafields(first:10){
nodes {
namespace
key
value
}
}
}
}
product(id:"gid://shopify/Product/7871455363270") {
title
media(first:10) {
nodes {
id
... on MediaImage {
metafields(first:10) {
nodes {
namespace
key
value
}
}
}
}
}
}
}