It seems that the inferred display width for alignment purposes of String31 and String7 includes the typeinfo but when printed it lacks the typeinfo:
julia> ["a" "b"
"c" "d"]
2×2 Matrix{String}:
"a" "b"
"c" "d"
julia> Any["a" "b"
"c" "d"]
2×2 Matrix{Any}:
"a" "b"
"c" "d"
julia> Any["a" "b"
String31("c") "d"]
2×2 Matrix{Any}:
"a" "b"
"c" "d"
julia> Any["a" "b"
String7("c") "d"]
2×2 Matrix{Any}:
"a" "b"
"c" "d"