Hi Vik,
It sounds like you have a few options depending on your requirements.
If you do not need to present the user with the "name" field populated when creating the custom entity, you can write a workflow inside of Dynamics 365 to populate this value "On Create" of the custom entity. Similar to this, you could write a plugin to do the same if a code-first approach is preferred.
If you need to display the value to the user when they are creating the record, there are a few ways you can get the information, however, they most likely all require some sort of customization.
First, you could utilize a Web Template with a FetchXml tag to retrieve the parent record and return back the field(s) you need in JSON format. You could then call this via JS/JQuery and populate the field on the child record.
Alternatively, you could use a Web Template for the custom entity create page that would be able to retrieve the parent entity, bind the field(s) you need to a hidden HTML section, and then you can retrieve those fields via JS on the child entity create webpage. I think this would be easier since you will only have one parent record and do not need to do an additional query into CRM for the information. Here's an example:
{% assign case = entities["incident"][request.params.parentid] %}
<div class="hidden">
<p id="caseName">{{case.name}}</p>
</div>
In your JS code you could do something like the following:
let caseName = $("#caseName").text();
$("#custom_number").val(caseName);
This would retrieve the hidden parameter and populate it into the "custom_number" field (or whatever it is called in your case) for your child entity.
Using out-of-box functionality unfortunately there is no way you could populate it using Entity Metadata unless the "Case Name" was stored on the Contact record, as this is available when populating values.
If you need any more assistance or have questions please don't hesitate to reach out!
Thanks!
Matt Bayes