I am also new with flink, couldn't find any documentation around generic schema, but I tried below schema and it works for generic json from kafka:
Types.ROW_NAMED(["key1","key1"],[Types.STRING(), Types.STRING()])
In the above example- you can use nested json under the keys - key1, key2 and convert back to python object in flink process function.
Above schema is for pyflink data stream API, you can find similar for java.